src/GameOfLife/Inputs/TemplateHandler/TemplateListPrinter.php
/**
     * Generates an output string from a list of templates.
     *
     * @param String $_title The title of the list
     * @param String[] $_templateFilePaths The list of template file paths
     */
Generates an output string from a list of templates.
@param String $_title The title of the list
@param String[] $_templateFilePaths The list of template file paths
Generates an output string from a list of templates . @param String $_title The title of the list @param String [] $_templateFilePaths The list of template file paths
private function printTemplateList(String $_title, array $_templateFilePaths)
    {
        $outputString = "\n" . $_title . ":\n";
        if (count($_templateFilePaths) == 0) $outputString .= "  None\n";
        else
        {
            foreach ($_templateFilePaths as $index => $templateFilePath)
            {
                $outputString .= "  " . ($index + 1) . ") " . basename($templateFilePath, ".txt") . "\n";
            }
        }
        echo $outputString;
    }
private function printTemplateList ( String $ _title , array $ _templateFilePaths ) { $ outputString = " \n " . $ _title . " : \n " ; if ( count ( $ _templateFilePaths ) == 0 ) $ outputString .= "   None \n " ; else { foreach ( $ _templateFilePaths as $ index => $ templateFilePath ) { $ outputString .= " " . ( $ index + 1 ) . " )  " . basename ( $ templateFilePath , " .txt " ) . " \n " ; } } echo $ outputString ; }
Generates an output string from a list of templates.
Generates an output string from a list of templates .