/** * Register a class locator * * @param ClassLocatorInterface $locator * @return void */ public function registerLocator(ClassLocatorInterface $locator) { $this->_locators[$locator->getType()] = $locator; }
/** * 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; } }