| 496 | | * getComponentAlias |
| 497 | | * retrieves the alias for given component name |
| 498 | | * if the alias couldn't be found, this method returns the given |
| 499 | | * component name |
| 500 | | * |
| 501 | | * @param string $componentName |
| 502 | | * @return string the component alias |
| 503 | | */ |
| 504 | | public function getComponentAlias($componentName) |
| 505 | | { |
| 506 | | if (isset($this->componentAliases[$componentName])) { |
| 507 | | return $this->componentAliases[$componentName]; |
| 508 | | } |
| 509 | | |
| 510 | | return $componentName; |
| 511 | | } |
| 512 | | |
| 513 | | /** |
| 514 | | * sets an alias for given component name |
| 515 | | * very useful when building a large framework with a possibility |
| 516 | | * to override any given class |
| 517 | | * |
| 518 | | * @param string $componentName the name of the component |
| 519 | | * @param string $alias |
| 520 | | * @return Doctrine_Manager |
| 521 | | */ |
| 522 | | public function setComponentAlias($componentName, $alias) |
| 523 | | { |
| 524 | | $this->componentAliases[$componentName] = $alias; |
| 525 | | |
| 526 | | return $this; |
| 527 | | } |
| 528 | | |
| 529 | | /** |