function clear() { $registry =& Registry::getRegistry(); foreach (array_keys($registry) as $key) { unset($registry[$key]); } }
/** * Remove an item from the registry. * @param $key string */ function delete($key) { $registry =& Registry::getRegistry(); if (isset($registry[$key])) { unset($registry[$key]); } }
/** * Loads all aspects from configured paths and activates class loader. */ public function start() { $classLoader = new ClassLoader(); $aspectLoader = AspectLoader::getLoader(); $registry = Registry::getRegistry(); foreach ($this->getAspectPaths() as $aspectPath) { $aspectLoader->loadAspects($aspectPath); } $aspectLoader->activate(); $aspectLoader->deactivate(); foreach ($aspectLoader->getAspects() as $aspectClass) { $registry->parseClass($aspectClass); } $classLoader->activate(); }
/** * @param \Lohini\Utils\Iban\Registry $registry */ public function __construct(Registry $registry = NULL) { if ($registry) { $this->registry = $registry->getRegistry(); } }