public function input($text, $defaultValue = '', $color = null) {
        $text = $text . ($defaultValue ? ": [$defaultValue]" : ": ");
        echo $color ? $this->color($text, $color) : $text;
        return trim(trim($result = fgets(fopen('php://stdin', 'r'))) ? $result : $defaultValue);
    }
public function input($text, $defaultValue = '', $color = null) {
        $text = $text . ($defaultValue ? ": [$defaultValue]" : ": ");
        echo $color ? $this->color($text, $color) : $text;
        return trim(trim($result = fgets(fopen('php://stdin', 'r'))) ? $result : $defaultValue);
    }
public function input ( $ text , $ defaultValue = '' , $ color = null ) { $ text = $ text . ( $ defaultValue ? ": [$defaultValue]" : ": " ) ; echo $ color ? $ this -> color ( $ text , $ color ) : $ text ; return trim ( trim ( $ result = fgets ( fopen ( 'php://stdin' , 'r' ) ) ) ? $ result : $ defaultValue ) ; }
Get input from cli.
@param string $text
@param string $defaultValue Value that will be returned if nothing is completed
@param null|string $color
@return string
Get input from cli .