public function inputObserver($callback, $exitCicle = null)
    {
        if (self::isCli() === false || is_callable($callback) === false) {
            return false;
        }

        $this->io = $callback;
        $this->ec = $exitCicle ? $exitCicle : $this->ec;

        if ($this->started) {
            return true;
        }

        $this->started = true;
        $this->fireInputObserver();

        return true;
    }
public function inputObserver($callback, $exitCicle = null)
    {
        if (self::isCli() === false || is_callable($callback) === false) {
            return false;
        }

        $this->io = $callback;
        $this->ec = $exitCicle ? $exitCicle : $this->ec;

        if ($this->started) {
            return true;
        }

        $this->started = true;
        $this->fireInputObserver();

        return true;
    }
public function inputObserver ( $ callback , $ exitCicle = null ) { if ( self :: isCli ( ) === false || is_callable ( $ callback ) === false ) { return false ; } $ this -> io = $ callback ; $ this -> ec = $ exitCicle ? $ exitCicle : $ this -> ec ; if ( $ this -> started ) { return true ; } $ this -> started = true ; $ this -> fireInputObserver ( ) ; return true ; }
Add callback event to input

@param callable $callback
@param string   $exitCicle
@return bool
Add callback event to input