echo "[?1003l"; echo "[?1000l"; static::$_enabled = false; return; } /** * Attach a callable to a listenable component. * * @access public * @param string $listenerId Listener ID. * @param mixed $callable Callable. * @return \Hoa\Core\Event\Listenable * @throw \Hoa\Core\Exception */ public function on($listenerId, $callable) { $this->_on->attach($listenerId, $callable); return $this; } } } namespace { /** * Advanced interaction. */ Hoa\Console::advancedInteraction(); /** * Untrack mouse. */ Hoa\Core::registerShutdownFunction('\\Hoa\\Console\\Mouse', 'untrack'); }
* $ php Mode.php < foobar * In this case, self::isRedirection(STDIN) will return true. * * @access public * @param resource $pipe Pipe. * @return bool */ public static function isRedirection($pipe) { $mode = self::getMode($pipe); return self::IS_REGULAR === $mode || self::IS_DIRECTORY === $mode || self::IS_LINK === $mode || self::IS_SOCKET === $mode || self::IS_BLOCK === $mode; } public static function getTput() { if (null === static::$_tput) { static::$_tput = new Tput(); } return static::$_tput; } } } namespace { /** * Restore interaction. */ Hoa\Core::registerShutdownFunction('Hoa\\Console\\Console', 'restoreInteraction'); /** * Flex entity. */ Hoa\Core\Consistency::flexEntity('Hoa\\Console\\Console'); }