Exemplo n.º 1
0
function fg_optional_echo_edit_content_button()
{
    if (fg_is_logged_in_admin()) {
        $path_pagina = Engines::getRequestUri();
        ?>
<br />
<div id="modifica_contenuto_link">
    <a href="/admin/modifica_contenuto.php?path_pagina=<?php 
        echo $path_pagina;
        ?>
">[[ Modifica il contenuto della pagina ]]</a>
</div>
<br />
    <?php 
    }
}
Exemplo n.º 2
0
 public static function dispatch()
 {
     $route_matched = false;
     $request_uri = Engines::getRequestUri();
     foreach (self::$route_definitions as $def) {
         if ($def->matches($request_uri)) {
             $route_matched = true;
             $match = $def->getMatch($request_uri);
             $controller_name = $match->getController();
             $action_name = $match->getAction();
             $format_name = $match->getFormat();
             CallStack::call($controller_name, $action_name, $format_name, array());
         }
     }
     if (!$route_matched) {
         foreach (self::$route_definitions as $route_def) {
             echo $route_def->dump();
         }
         Log::error("dispatch", "Mapping not found for URL : " . Engines::getRequestUri());
     }
 }
Exemplo n.º 3
0
 public function testEngineRequestUrl()
 {
     $this->assertEqual(Engines::getRequestUri(), "/" . FRAMEWORK_CORE_PATH . "tests/all_tests.php");
 }