script/todo.php
private function getOutput()
    {
        $output = "# Todo list\n\n";

        // Make menu
        $columns = 12;

        $captions = implode('|', array_fill(0, $columns, ' '));
        $subcaptions = implode('|', array_fill(0, $columns, ':---:'));

        $output .= "|$captions|\n";
        $output .= "|$subcaptions|\n";

        $menu = [];
        foreach (array_keys($this->output) as $language) {
            $menu[] = "[$language](#$language)";
        }

        $rows = array_chunk($menu, $columns);
        array_map(function ($row) use (&$output) {
            $row = implode(' | ', $row);
            $output .= $row."\n";
        }, $rows);

        $output .= "\n\n";

        // Make items
        foreach ($this->output as $language => $values) {
            $output .= "#### {$language}:\n";
            $output .= implode(PHP_EOL, $values);
            $output .= "\n\n[ [to top](#todo-list) ]\n\n";
        }

        return $output;
    }
private function getOutput()
    {
        $output = "# Todo list\n\n";

        // Make menu
        $columns = 12;

        $captions = implode('|', array_fill(0, $columns, ' '));
        $subcaptions = implode('|', array_fill(0, $columns, ':---:'));

        $output .= "|$captions|\n";
        $output .= "|$subcaptions|\n";

        $menu = [];
        foreach (array_keys($this->output) as $language) {
            $menu[] = "[$language](#$language)";
        }

        $rows = array_chunk($menu, $columns);
        array_map(function ($row) use (&$output) {
            $row = implode(' | ', $row);
            $output .= $row."\n";
        }, $rows);

        $output .= "\n\n";

        // Make items
        foreach ($this->output as $language => $values) {
            $output .= "#### {$language}:\n";
            $output .= implode(PHP_EOL, $values);
            $output .= "\n\n[ [to top](#todo-list) ]\n\n";
        }

        return $output;
    }
private function getOutput ( ) { $ output = "# Todo list\n\n" ; // Make menu $ columns = 12 ; $ captions = implode ( '|' , array_fill ( 0 , $ columns , ' ' ) ) ; $ subcaptions = implode ( '|' , array_fill ( 0 , $ columns , ':---:' ) ) ; $ output .= "|$captions|\n" ; $ output .= "|$subcaptions|\n" ; $ menu = [ ] ; foreach ( array_keys ( $ this -> output ) as $ language ) { $ menu [ ] = "[$language](#$language)" ; } $ rows = array_chunk ( $ menu , $ columns ) ; array_map ( function ( $ row ) use ( & $ output ) { $ row = implode ( ' | ' , $ row ) ; $ output .= $ row . "\n" ; } , $ rows ) ; $ output .= "\n\n" ; // Make items foreach ( $ this -> output as $ language => $ values ) { $ output .= "#### {$language}:\n" ; $ output .= implode ( PHP_EOL , $ values ) ; $ output .= "\n\n[ [to top](#todo-list) ]\n\n" ; } return $ output ; }
Forming the page content for output.

@return string
Forming the page content for output .