if (false === static::$_enabled) { return; } echo "[?1003l"; echo "[?1000l"; static::$_enabled = false; return; } /** * Attach a callable to a listenable component. * * @param string $listenerId Listener ID. * @param mixed $callable Callable. * @return \Hoa\Core\Event\Listenable * @throws \Hoa\Core\Exception */ public function on($listenerId, $callable) { $this->_on->attach($listenerId, $callable); return $this; } } /** * Advanced interaction. */ Console::advancedInteraction(); /** * Untrack mouse. */ Core::registerShutdownFunction('\\Hoa\\Console\\Mouse', 'untrack');
} /** * Get the current tput instance of the current process. * * @return \Hoa\Console\Tput */ public static function getTput() { if (null === static::$_tput) { static::$_tput = new Tput(); } return static::$_tput; } /** * Check whether we are running behind TMUX(1). * * @return bool */ public static function isTmuxRunning() { return isset($_SERVER['TMUX']); } } /** * Restore interaction. */ Core::registerShutdownFunction('Hoa\\Console\\Console', 'restoreInteraction'); /** * Flex entity. */ Core\Consistency::flexEntity('Hoa\\Console\\Console');
/** * Component's name. * * @var string */ protected $_name = 'Stream'; /** * ID of the component. * * @param string $id ID of the component. * @return mixed */ public function reachId($id) { return Stream::getStreamHandler($id); } } /** * Flex entity. */ Core\Consistency::flexEntity('Hoa\\Stream\\Stream'); /** * Shutdown method. */ Core::registerShutdownFunction('\\Hoa\\Stream\\Stream', '_Hoa_Stream'); /** * Add the hoa://Library/Stream component. Should be use to reach/get an entry * in the \Hoa\Stream register. */ $protocol = Core::getInstance()->getProtocol(); $protocol['Library'][] = new _Protocol();