本文整理汇总了PHP中MainController::handle方法的典型用法代码示例。如果您正苦于以下问题:PHP MainController::handle方法的具体用法?PHP MainController::handle怎么用?PHP MainController::handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainController
的用法示例。
在下文中一共展示了MainController::handle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
/**
* Thin PHP Framework (TPF) 2011 http://thinphp.com
*
* Licensed under TPF License at http://bit.ly/TPFLicense
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2011, Thin PHP Framework Team
* @link http://thinphp.com
* @package app.web
* @license TPF License http://bit.ly/TPFLicense
*/
define('BASE', dirname(__FILE__));
require_once BASE . '/app/includes.php';
if (!isset($_GET['route'])) {
exit('No direct script access allowed!');
}
$c = new MainController($_GET['route']);
$c->handle(null);
示例2: MainController
<?php
/**
* Copyright (c) 2014 Keith Casey.
*
* This code is designed to accompany the lynda.com video course "Design Patterns in PHP"
* by Keith Casey. If you've received this code without seeing the videos, go watch the
* videos. It will make way more sense and be more useful in general.
*/
/**
* Suggested URL patterns for your solution:
* index.php?m=greeting&a=hello
* index.php?m=greeting&a=goodbye.
*/
define('URL', '/PHPDesignPatterns/06-MVC/challenge');
include __DIR__ . '/controllers/MainController.php';
$controller = new MainController(filter_input(INPUT_GET, 'a', FILTER_SANITIZE_STRING));
$controller->handle();