コード例 #1
0
ファイル: instaphp.php プロジェクト: nobuhiko/Instaphp
 /**
  * I AM SINGLETON
  * We don't need to go instantiating all these objects more than once here
  * @return Instaphp 
  */
 public static function Instance($token = null)
 {
     if (self::$instance == null || !empty($token)) {
         self::$instance = new self($token);
     }
     return self::$instance;
 }
コード例 #2
0
ファイル: Instaphp.php プロジェクト: fishmarket/instaphp
 /**
  * I AM SINGLETON
  * We don't need to go instantiating all these objects more than once here
  * @return Instaphp 
  */
 public static function Instance($token = null, $config = array())
 {
     if (self::$instance == null || !empty($token)) {
         self::$instance = new self($token, $config);
     }
     return self::$instance;
 }