public static function createPage($id, $name, $title, $description, $order)
 {
     $newPage = new Page();
     $newPage->setId($id);
     $newPage->setName($name);
     $newPage->setTitel($title);
     $newPage->setDescription($description);
     $newPage->setOrder($order);
     return $newPage;
 }
Example #2
0
<?php

$page = new Page();
$page->setDescription(__('Frhed is an binary file editor for Windows. It is small but has many advanced features like ability to load big files partially.'));
$page->setKeywords(__('Frhed, free, hex editor, binary file, load partially, hexdump, compare'));
$page->addRssFeed('http://sourceforge.net/export/rss2_projnews.php?group_id=236485', __('Frhed News'));
$page->addRssFeed('http://sourceforge.net/export/rss2_projfiles.php?group_id=236485', __('Frhed File Releases'));
$page->printHead();
$page->printPara(__('Frhed is an binary file editor for Windows. It is small but has many advanced features like ability to load big files partially.'));
$page->printHeading(__('Features'));
?>
<ul>
  <li><?php 
__e('Editable file size limited only by available system memory');
?>
</li>
  <li><?php 
__e('Load files partially');
?>
</li>
  <li><?php 
__e('Export as hexdump to file or clipboard');
?>
</li>
  <li><?php 
__e('Search for any combination of text and binary values');
?>
</li>
  <li><?php 
__e('Compare files');
?>
Example #3
0
<?php

require __DIR__ . '/app/bootstrap_sample_01.php';
use Symfony\Component\HttpFoundation\Response;
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
$welcome = new Page();
$welcome->setTitle('Benvenuti!!!');
$welcome->setDescription('questa รจ la pagina di benvenuto');
$about = new Page();
$about->setTitle('Chi Siamo?');
$about->setDescription('SVILUPPATORI!!!');
$pages = ['welcome' => $welcome, 'about-us' => $about];
$app->get('/', function ($page = 'welcome') use($pages) {
    $mainPage = $pages[$page];
    $html = new HtmlExample($mainPage);
    return new Response($html->getOutput(), $mainPage->getCode());
})->bind('homepage');
$app->get('/{page}', function ($page) use($pages) {
    $mainPage = $pages[$page];
    $html = new HtmlExample($mainPage);
    return new Response($html->getOutput(), $mainPage->getCode());
})->bind('all_pages');
class Page
{
    protected $title;
    protected $description;
    protected $code_status;
    public function __construct()
    {
        $this->code_status = 404;