/**
  * Forgets a loaded plugin or all of them if first parameter is null
  *
  * @param string $plugin name of the plugin to forget
  * @return void
  */
 public static function unload($plugin = null)
 {
     if ($plugin === null) {
         static::$_plugins = [];
     } else {
         unset(static::$_plugins[$plugin]);
     }
 }
Esempio n. 2
0
 /**
  * Forgets a loaded plugin or all of them if first parameter is null
  *
  * @param string $plugin name of the plugin to forget
  *
  * @return void
  */
 public static function unload($plugin = NULL)
 {
     if ($plugin === NULL) {
         static::$_plugins = array();
     } else {
         unset(static::$_plugins[$plugin]);
     }
 }