当前位置: 首页>>代码示例>>PHP>>正文


PHP Mapper::connect方法代码示例

本文整理汇总了PHP中Mapper::connect方法的典型用法代码示例。如果您正苦于以下问题:PHP Mapper::connect方法的具体用法?PHP Mapper::connect怎么用?PHP Mapper::connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mapper的用法示例。


在下文中一共展示了Mapper::connect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Mapper

        $_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');
开发者ID:Br3nda,项目名称:openmicroblogger,代码行数:31,代码来源:boot.php

示例2: onRouterInitialized

 /**
  * 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;
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:18,代码来源:RSSCloudPlugin.php

示例3: Routing

<?php

$routing = new Routing();
$mapper = new Mapper();
$mapper->connect(':controller/:action/:id', array('controller' => "pages", 'action' => "index", 'name' => "default"));
开发者ID:russ,项目名称:jacks-php,代码行数:5,代码来源:routes.php


注:本文中的Mapper::connect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。