Пример #1
0
 function clear()
 {
     $registry =& Registry::getRegistry();
     foreach (array_keys($registry) as $key) {
         unset($registry[$key]);
     }
 }
Пример #2
0
 /**
  * Remove an item from the registry.
  * @param $key string
  */
 function delete($key)
 {
     $registry =& Registry::getRegistry();
     if (isset($registry[$key])) {
         unset($registry[$key]);
     }
 }
Пример #3
0
 /**
  * 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();
 }
Пример #4
0
 /**
  * @param \Lohini\Utils\Iban\Registry $registry
  */
 public function __construct(Registry $registry = NULL)
 {
     if ($registry) {
         $this->registry = $registry->getRegistry();
     }
 }