Zepi/Core/Utils/src/Helper/CliHelper.php
public function inputText($text, $defaultValue = '')
    {
        $defaultValueStr = '';
        if ($defaultValue != '') {
            $defaultValueStr = '[' . $defaultValue . '] ';
        }
        
        echo $text . ' ' . $defaultValueStr;
    
        $handle = fopen('php://stdin', 'r');
        $line = fgets($handle);
        $preparedLine = strtolower(trim($line));
    
        if ($preparedLine === '') {
            $preparedLine = $defaultValue;
        }
    
        return $preparedLine;
    }
public function inputText($text, $defaultValue = '')
    {
        $defaultValueStr = '';
        if ($defaultValue != '') {
            $defaultValueStr = '[' . $defaultValue . '] ';
        }
        
        echo $text . ' ' . $defaultValueStr;
    
        $handle = fopen('php://stdin', 'r');
        $line = fgets($handle);
        $preparedLine = strtolower(trim($line));
    
        if ($preparedLine === '') {
            $preparedLine = $defaultValue;
        }
    
        return $preparedLine;
    }
public function inputText ( $ text , $ defaultValue = '' ) { $ defaultValueStr = '' ; if ( $ defaultValue != '' ) { $ defaultValueStr = '[' . $ defaultValue . '] ' ; } echo $ text . ' ' . $ defaultValueStr ; $ handle = fopen ( 'php://stdin' , 'r' ) ; $ line = fgets ( $ handle ) ; $ preparedLine = strtolower ( trim ( $ line ) ) ; if ( $ preparedLine === '' ) { $ preparedLine = $ defaultValue ; } return $ preparedLine ; }
Asks the cli user for input text.

@access public
@param string $text
@param string $defaultValue
@return string
Asks the cli user for input text .