/** * * @return Console */ public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
/** * * * @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; }