connect() public static méthode

public static connect ( $url, $route )
Exemple #1
0
        $_COOKIE = magic_quotes_stripquotes($_COOKIE);
        $_REQUEST = magic_quotes_stripquotes($_REQUEST);
    } else {
        $_GET = magic_quotes_stripslashes($_GET);
        $_POST = magic_quotes_stripslashes($_POST);
        $_COOKIE = magic_quotes_stripslashes($_COOKIE);
        $_REQUEST = magic_quotes_stripslashes($_REQUEST);
    }
}
/**
 * routes
 */
// create a request mapper object to regex-match the URI to a Route
$request = new Mapper();
// add a new Route
$request->connect('static/:staticresource', array('requirements' => array('[A-Za-z0-9_.]+')));
// load static-file-cache and debug aspects
//include $GLOBALS['PATH']['plugins'] . 'renderer.php';
// this doesn't do anything because the aspect-filter was deleted XXX
//$request->routematch();
$request->connect('admin', array('action' => 'index', 'resource' => 'admin'));
/**
 * read the configuration file
 */
include $GLOBALS['PATH']['library'] . 'yaml.php';
$loader = new Horde_Yaml();
if (file_exists($app . 'config.yml')) {
    extract($loader->load(file_get_contents($app . 'config.yml')));
    extract(${$env}['enable_db']);
} else {
    $env = array('app_folder' => 'app');
Exemple #2
0
 /**
  * Add RSSCloud-related paths to the router table
  *
  * Hook for RouterInitialized event.
  *
  * @param Mapper $m URL parser and mapper
  *
  * @return boolean hook return
  */
 function onRouterInitialized($m)
 {
     $m->connect('/main/rsscloud/request_notify', array('action' => 'RSSCloudRequestNotify'));
     // XXX: This is just for end-to-end testing. Uncomment if you need to pretend
     //      to be a cloud hub for some reason.
     //$m->connect('/main/rsscloud/notify',
     //            array('action' => 'LoggingAggregator'));
     return true;
 }
Exemple #3
0
<?php

$routing = new Routing();
$mapper = new Mapper();
$mapper->connect(':controller/:action/:id', array('controller' => "pages", 'action' => "index", 'name' => "default"));