本文整理汇总了PHP中Base::run方法的典型用法代码示例。如果您正苦于以下问题:PHP Base::run方法的具体用法?PHP Base::run怎么用?PHP Base::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base::run方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAssertNotZeroExitSuppressed
/**
* @test
*/
public function testAssertNotZeroExitSuppressed()
{
// Command should yield an error
$command = "exit 1";
$this->_obj->expects($this->any())->method('getCommand')->will($this->returnValue($command));
$this->_obj->setSuppressErrors(true);
$this->_obj->run();
$this->markTestIncomplete("Don't know how to check for the absence of a certain output regex");
}
示例2: exit
<?php
/**
* 队列
*
*
* 计划任务触发 by abc.com
*/
$_SERVER['argv'][1] = $_GET['act'];
@($_SERVER['argv'][2] = $_GET['op']);
if (empty($_SERVER['argv'][1])) {
exit('Access Invalid!');
}
define('APP_ID', 'crontab');
define('BASE_PATH', str_replace('\\', '/', dirname(__FILE__)));
define('TRANS_MASTER', true);
if (!@(include dirname(dirname(__FILE__)) . '/global.php')) {
exit('global.php isn\'t exists!');
}
if (!@(include BASE_CORE_PATH . '/33hao.php')) {
exit('33hao.php isn\'t exists!');
}
if (PHP_SAPI == 'cli') {
$_GET['act'] = $_SERVER['argv'][1];
$_GET['op'] = empty($_SERVER['argv'][2]) ? 'index' : $_SERVER['argv'][2];
}
if (!@(include BASE_PATH . '/control/control.php')) {
exit('control.php isn\'t exists!');
}
Base::run();
示例3: run
public function run(array $context = [])
{
$this->logger->info('Press Home Key');
return parent::run($context);
}
示例4: Base
<?php
require_once __DIR__ . '/../vendor/autoload.php';
$f3 = new Base();
//main page
$f3->route('GET /', function () {
include 'main.php';
});
// Get the product lists
$f3->route('GET /example', function () {
include 'example1.php';
});
//add a new product to all stores
$f3->route('GET|POST /new', function () {
include 'newproducts.php';
});
//update the stock of a given product
$f3->route('GET|POST /products/*', function () {
include 'update.php';
});
$f3->route('GET /brew/@count', function ($f3, $params) {
echo $params['count'] . ' bottles of beer on the wall.';
});
$f3->run();
示例5: Base
<?php
/*
* The MIT License
*
* Copyright 2016 Vincent Quatrevieux <quatrevieux.vincent@gmail.com>.
*
* 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.
*/
require 'base/Base.php';
$app = new Base();
$app->run();