src/GameOfLife/Inputs/BoardEditor/Options/ListOptionsOption.php
/**
     * Lists all available options.
     *
     * @return bool Indicates whether the board editing is finished
     */
Lists all available options.
@return bool Indicates whether the board editing is finished
Lists all available options . @return bool Indicates whether the board editing is finished
public function listOptions()
    {
        $outputTable = array();
        foreach ($this->parentBoardEditor->optionHandler()->options() as $optionName => $option)
        {
            $optionUsageOutput = " - " . $optionName;
            foreach ($option->arguments() as $argumentName => $argumentType)
            {
                $optionUsageOutput .= " <" . $argumentName . ">";
            }
            $outputTable[] = array($optionUsageOutput, ": " . $option->description());
        }
        echo "\n\nOptions:\n";
        $this->shellTablePrinter->printTable($outputTable, 3, array(), true);
        echo "\n\n";
        return false;
    }
public function listOptions ( ) { $ outputTable = array ( ) ; foreach ( $ this -> parentBoardEditor -> optionHandler ( ) -> options ( ) as $ optionName => $ option ) { $ optionUsageOutput = "  -  " . $ optionName ; foreach ( $ option -> arguments ( ) as $ argumentName => $ argumentType ) { $ optionUsageOutput .= "  < " . $ argumentName . " > " ; } $ outputTable [ ] = array ( $ optionUsageOutput , " :  " . $ option -> description ( ) ) ; } echo " \n \n Options: \n " ; $ this -> shellTablePrinter -> printTable ( $ outputTable , 3 , array ( ) , true ) ; echo " \n \n " ; return false ; }
Lists all available options.
Lists all available options .
// Get the length of the longest option name // Output the option list