Ejemplo n.º 1
0
 /**
  * Register a class locator
  *
  * @param ClassLocatorInterface $locator
  * @return void
  */
 public function registerLocator(ClassLocatorInterface $locator)
 {
     $this->_locators[$locator->getType()] = $locator;
 }
Ejemplo n.º 2
0
 /**
  * Register a class locator
  *
  * @param  ClassLocatorInterface $locator
  * @param  bool $prepend If true, the locator will be prepended instead of appended.
  * @return void
  */
 public function registerLocator(ClassLocatorInterface $locator, $prepend = false)
 {
     $array = array($locator->getName() => $locator);
     if ($prepend) {
         $this->_locators = $array + $this->_locators;
     } else {
         $this->_locators = $this->_locators + $array;
     }
 }