本文整理汇总了PHP中WebApp::run方法的典型用法代码示例。如果您正苦于以下问题:PHP WebApp::run方法的具体用法?PHP WebApp::run怎么用?PHP WebApp::run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebApp
的用法示例。
在下文中一共展示了WebApp::run方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testExecuteController
public function testExecuteController()
{
$logger = $this->getMock('Conpago\\Logging\\Contract\\ILogger');
$response = $this->getMock('Conpago\\Helpers\\Contract\\IResponse');
$requestDataReader = $this->getMock('Conpago\\Helpers\\Contract\\IRequestDataReader');
$requestData = $this->getMock('Conpago\\Helpers\\Contract\\IRequestData');
$requestDataReader->expects($this->any())->method('getRequestData')->willReturn($requestData);
$controller = $this->getMock('Conpago\\Presentation\\Contract\\IController');
$controller->expects($this->once())->method('execute')->with($requestData);
$appConfig = $this->getMock('Conpago\\Config\\Contract\\IAppConfig');
$webApp = new WebApp($requestDataReader, $controller, $response, $logger, $appConfig);
$webApp->run();
}
示例2: WebApp
<?php
require_once 'core/webapp.php';
$topmodul = 'gnopaste';
$app = new WebApp(array('topmodul' => $topmodul, 'skip' => array('auth', 'bench', 'test'), 'loglevel' => 3));
$app->run($topmodul);
示例3: dirname
<?php
define('APP_NAME', 'web');
define('PI_ROOT', dirname(dirname(dirname(__FILE__))) . '/pi/');
define('APP_ROOT', dirname(dirname(__FILE__)) . '/');
define('COM_ROOT', APP_ROOT . 'com/');
define('APP_CTR_ROOT', APP_ROOT . APP_NAME . '/ctr/');
define('LOG_PATH', dirname(dirname(dirname(__FILE__))) . '/logs');
define("__PI_EN_DEBUG", 1);
include PI_ROOT . 'Web.php';
//web项目需要的框架配置
Pi::set('global.logFile', 'web');
Pi::set('env', 'dev');
$app = new WebApp();
$app->run();
示例4: loginPrompt
<?php
/**
* Index file for BWSC Website
*
*
* @category WebApp.Index
* @package index.php
* @author Huw Jones <huwcbjones@gmail.com>
* @copyright 2014 Huw Jones
*/
/*
* lib/webapp.php
*/
require 'lib/_init.php';
$webapp = new WebApp();
$webapp->run();
$help = file_get_contents(__LIBDIR__ . '/cli_help.txt') . PHP_EOL;
function loginPrompt()
{
global $webapp;
echo "\n===== WebApp Login =====\n";
echo "Enter your username: ";
$user = trim(fgets(STDIN));
echo "Enter your Password: ";
$pass = trim(fgets(STDIN));
if ($webapp->login($user, $pass)) {
echo "Logged in!\n";
} else {
echo "Invalid username/password\n";
loginPrompt();
}
示例5: WebApp
<?php
require_once 'core/webapp.php';
$app = new WebApp(array('topmodul' => 'yw_start', 'skip' => array('auth', 'bench', 'test'), 'loglevel' => 3));
$app->run('yw_start');
示例6: dirname
*
**************************************************************************/
/**
* @file index.php
* @author huqingping
* @date 2010/05/07 13:49:09
* @version 1.0
* @brief
*
**/
define('WEB_ROOT', dirname(__DIR__));
define('FR_ROOT', WEB_ROOT . '/Lessp/fr/');
define('RUN_ROOT', WEB_ROOT . '/runroot/');
define('LIB_ROOT', WEB_ROOT . '/Lessp/lib/');
define('PLUGIN_ROOT', WEB_ROOT . '/plugin/');
define('LOG_ROOT', WEB_ROOT . '/log/');
define('CONF_ROOT', WEB_ROOT . '/conf/');
define('TMP_ROOT', WEB_ROOT . '/tmp/');
define('EXLIB_ROOT', WEB_ROOT . '/exlib/');
define('PAGE_ROOT', WEB_ROOT . '/page/');
define('API_ROOT', WEB_ROOT . '/api/');
define('TOOL_ROOT', WEB_ROOT . '/bin/');
if (isset($argv)) {
require_once FR_ROOT . 'app/ToolApp.php';
$obj = new ToolApp();
$obj->run();
} else {
require_once FR_ROOT . 'app/WebApp.php';
$obj = new WebApp();
$obj->run();
}