當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。