Exemplo n.º 1
0
 /**
  *
  * @return Console
  */
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
 /**
  *
  *
  * @return Console
  */
 public static function instance()
 {
     if (!Console::$instance) {
         // Command line access ONLY
         if (!Kohana::$is_cli) {
             return FALSE;
         }
         self::$instance = new Console();
         self::$_stdout = fopen('php://stdout', 'w');
     }
     return Console::$instance;
 }