本文整理汇总了PHP中FrontController::run方法的典型用法代码示例。如果您正苦于以下问题:PHP FrontController::run方法的具体用法?PHP FrontController::run怎么用?PHP FrontController::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrontController
的用法示例。
在下文中一共展示了FrontController::run方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Execute the Parent Run function
*/
public function run()
{
if ($this->oPrediggoSearchConfig->search_active) {
parent::run();
} else {
header("Location: ../");
}
}
示例2: explode
function __construct()
{
if (isset($_GET['r'])) {
//разбить запрос
$splitReq = explode('/', $_GET['r']);
//получить имя файла, достать последний массив из конца сстроки запроса
$this->filename = array_pop($splitReq);
//все остальное в массиве, это путь к файлу
$this->sect = $splitReq;
//process request
$this->processRequest();
} else {
if (isset($_GET['route'])) {
$frontController = new FrontController();
$frontController->run();
exit;
}
ST::redirectToRoute("Index/index");
}
}
示例3: run
public function run(FrontController $frontController)
{
try {
// Enable output buffering.
ob_start();
// Build the HTTP context data.
$requestPath = $frontController->buildContext($this->configuration);
// Build the controller path string for controller class autoloading.
$this->controllerPath = "{$this->applicationPath}/controllers{$requestPath}";
// Execute the front controller.
$frontController->run();
$frontController->renderView();
// Send HTTP response and turn off output buffering.
ob_end_flush();
} catch (Exception $exception) {
// Destroy any output buffer contents that could have been added.
ob_clean();
$frontController->renderErrorView(implode('<br>', [$exception->getMessage(), "<strong>Fichier</strong> : " . $exception->getFile(), "<strong>Ligne</strong> : " . $exception->getLine()]));
}
}
示例4: FrontController
Tools::redirectLink(__PS_BASE_URI__ . '/modules/paypal/express_checkout/submit.php?' . $query);
} else {
$controller = new FrontController();
$controller->init();
Tools::redirect(Context::getContext()->link->getModuleLink('paypal', 'submit', $values));
}
}
} else {
// If Cart changed, no need to keep the paypal data
unset(Context::getContext()->cookie->{PaypalExpressCheckout::$COOKIE_NAME});
$ppec->logs[] = $ppec->l('Cart changed since the last checkout express, please make a new Paypal checkout payment');
}
}
if (_PS_VERSION_ < '1.5') {
$display = new BWDisplay();
} else {
$display = new FrontController();
}
// Display payment confirmation
if ($ppec->ready && Tools::getValue('get_confirmation')) {
if (_PS_VERSION_ < '1.5') {
$currency = new Currency((int) $ppec->getContext()->cart->id_currency);
$ppec->getContext()->smarty->assign(array('form_action' => PayPal::getShopDomainSsl(true, true) . _MODULE_DIR_ . $ppec->name . '/express_checkout/submit.php', 'total' => Tools::displayPrice($ppec->getContext()->cart->getOrderTotal(true), $currency), 'logos' => $ppec->paypal_logos->getLogos(), 'use_mobile' => (bool) $ppec->getContext()->getMobileDevice()));
$display->setTemplate(_PS_MODULE_DIR_ . 'paypal/views/templates/front/order-summary.tpl');
}
} else {
$ppec->getContext()->smarty->assign(array('message' => $ppec->l('Error occurred:'), 'logs' => $ppec->logs, 'use_mobile' => $ppec->getContext()->getMobileDevice()));
$display->setTemplate(_PS_MODULE_DIR_ . 'paypal/views/templates/front/error.tpl');
}
$display->run();
}
示例5: Request
<?php
/**
* smac entry point
*/
define('DEBUG', true);
/* loading core */
require_once 'smac.php';
new Request();
@(list($route, $action, $param) = Request::ParseUri());
$fc = new FrontController($route, $action, $param);
$fc->run();
示例6: dirname
<?php
require dirname(__FILE__) . "/include/common.php";
$frontController = new FrontController();
$frontController->run();
示例7: isset
* Elefant CMS - http://www.elefantcms.com/
*
* Copyright (c) 2011 Johnny Broadway
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* This is the front controller of Elefant. All dynamic requests
* are sent here to be handled and served.
*/
require 'lib/FrontController.php';
$argc = isset($argc) ? $argc : null;
$argv = isset($argv) ? $argv : null;
return FrontController::run($argv, $argc);
示例8: pr
* Created by PhpStorm.
* User: gilles.azais
* Date: 1/25/2016
* Time: 2:28 PM
*/
define('APPLICATION_PATH', "model");
require 'routeHelper.php';
require 'view/_partials/partialFunctions.php';
require 'controller/Loader.php';
require 'controller/FrontController.php';
require 'controller/Controller.php';
require 'controller/Mapper.php';
require 'controller/db.php';
require 'model/entities/Entity.php';
/*require('controller/controllers/BestelController.php');
require('controller/Controllers/RegisterController.php');
require('controller/Controllers/ContactController.php');
require('controller/Controllers/HomeController.php');
require('controller/Controllers/LoginController.php');
require('controller/Controllers/OverOnsController.php');
require('controller/Controllers/WinkelWagenController.php');*/
function pr($var)
{
echo "<pre>";
var_dump($var);
echo "</pre>";
}
session_start();
$frontcontroller = new FrontController();
$frontcontroller->run();
示例9: actionGetAll
}
}
public function actionGetAll()
{
$this->success($this->data);
}
public function actionGetCount()
{
$this->success(array('count' => $this->data['count']));
}
public function actionGetSpeed()
{
$this->success(array('speed' => $this->data['speed']));
}
protected function success($data)
{
$out = array_merge(array('status' => 'OK'), $data);
echo json_encode($out);
exit;
}
protected function error($code, $message)
{
http_response_code($code);
echo json_encode(array('status' => 'ERROR', 'message' => $message));
exit;
}
}
// Go go go!
$frontController = new FrontController();
$frontController->run('Api');
示例10: Auth
<?php
require_once 'config/_definitions.php';
//load main node config
require_once CORE_REPOSITORY_REAL_PATH . 'config/_version.php';
//version
require_once CORE_APP_PATH . 'config/_definitions.php';
//central planner Load
require_once 'config/config.php';
//local config
require_once 'config/autoloader.php';
//local autoloader
require_once CORE_REPOSITORY_REAL_PATH . 'vendor/autoload.php';
//vendor
$app = App::get_instance($params);
require_once CORE_REPOSITORY_REAL_PATH . 'config/_services.php';
//load services
require_once 'init.php';
$app->user = new Auth();
$app->node = MY_NODE;
$app->tbId = CAAttendance::where('name', 'like', '%' . TB_PATTERN . '%')->where('is_tb', 1)->first(['id'])->id;
if (!$app->tbId) {
App::$instance->MQ->setMessage('Внимание: нет связи с Планировщиком ЦА, вы не получаете события с центрального сервера', 'danger');
}
header($app->opt->header);
date_default_timezone_set($app->opt->timezone);
$router = new FrontController();
$router->run();
示例11: FrontController
<?php
/*
* formatar corretamente os acentos
*/
header('Content-Type: text/html; charset=utf-8');
/*
* CARREGA INTERFACE E CLASSE PRIMARIAS
*/
require_once "interface/iController.php";
require_once "controller/FrontController.php";
/*
* INICIALIZA APLICACAO
*/
$controller = new FrontController();
$controller->run();