Location: PHPKode > projects > SRSW4IT > app/bootstrap.php
<?php

// Krok 1: nacteni Nette Framework
// kvuli automatickemu nacitani trid
require_once LIBS_DIR. '/Nette/loader.php';

// Krok 2: Zapnuti debug modu
//Debug::enable();

// Krok 3: Ziskani hlavniho kontroleru
$application = Environment::getApplication();
//$application->catchExceptions = true;

$router = $application->getRouter(); 

$flag = NULL;

if (Environment::getHttpRequest()->isSecured())
{
    $flag = SimpleRouter::SECURED;
}

// mod_rewrite detection
if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) 
{
    $router[] = new Route('index.php', array(
    'presenter' => 'Default',
    ), Route::ONE_WAY);
     
    $router[] = new Route('<presenter>/<action>/<id>', array(
    'presenter' => 'Default',
    'action' => 'default',
    'id' => NULL,
    ),$flag);
} 
else 
{
    // vytvoreni jednosmerne routy, ktera bude odchytavat
    // vsechny dotazy smerujici na index.php
    // a presmerovavat na routu nize do cool-url tvaru
    // automaticky zohlednuje SEO,
    // takze se vam tyto stranky nezaindexuji dvakrat
    $router[] = new SimpleRouter(array(
    'presenter' => 'Default',
    'action' => 'default',
	),$flag);
    
    $router[] = new SimpleRouter(array(
        'presenter' => 'Default',
        'action' => 'default',
        'id' => NULL,
    ), $flag); 
}  

// Krok 4: Spusteni aplikace
$application->run();

if (Environment::getHttpRequest()->isSecured())
die();


?>
Return current item: SRSW4IT