Exemple #1
0
 public static function unregister($key = null)
 {
     if (null === $key) {
         self::$_registry = array();
     } else {
         if (isset(self::$_registry[$key])) {
             if (is_object(self::$_registry[$key]) && method_exists(self::$_registry[$key], '__destruct')) {
                 self::$_registry[$key]->__destruct();
             }
             unset(self::$_registry[$key]);
         }
     }
 }