コード例 #1
0
ファイル: Injector.php プロジェクト: prostart/cobblestonepath
 /**
  * If a user wants to use the injector as a static reference
  *
  * @param array $config
  * @return Injector
  */
 public static function inst($config = null)
 {
     if (!self::$instance) {
         self::$instance = new Injector($config);
     }
     return self::$instance;
 }
コード例 #2
0
 /**
  * Sets the default global injector instance.
  *
  * @param Injector $instance
  * @return Injector Reference to new active Injector instance
  */
 public static function set_inst(Injector $instance)
 {
     return self::$instance = $instance;
 }