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


PHP Base::run方法代码示例

本文整理汇总了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");
 }
开发者ID:punkstar,项目名称:testrig,代码行数:12,代码来源:BaseTest.php

示例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();
开发者ID:flying3615,项目名称:chuniang,代码行数:30,代码来源:cj_index.php

示例3: run

 public function run(array $context = [])
 {
     $this->logger->info('Press Home Key');
     return parent::run($context);
 }
开发者ID:acgrid,项目名称:adbot,代码行数:5,代码来源:ReturnHome.php

示例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();
开发者ID:artisdom,项目名称:equanimous-tribble,代码行数:24,代码来源:index.php

示例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();
开发者ID:vincent4vx,项目名称:DependencyInjection,代码行数:28,代码来源:index.php


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