當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Terminus::getRunner方法代碼示例

本文整理匯總了PHP中Terminus::getRunner方法的典型用法代碼示例。如果您正苦於以下問題:PHP Terminus::getRunner方法的具體用法?PHP Terminus::getRunner怎麽用?PHP Terminus::getRunner使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Terminus的用法示例。


在下文中一共展示了Terminus::getRunner方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: info

 /**
  * Print various data about the CLI environment.
  *
  * ## OPTIONS
  *
  * [--format=<format>]
  * : Accepted values: json
  */
 function info($_, $assoc_args)
 {
     $php_bin = defined('PHP_BINARY') ? PHP_BINARY : getenv('TERMINUS_PHP_USED');
     $runner = Terminus::getRunner();
     $info = array('php_binary_path' => $php_bin, 'php_version' => PHP_VERSION, 'php_ini' => get_cfg_var('cfg_file_path'), 'project_config_path' => $runner->project_config_path, 'wp_cli_dir_path' => TERMINUS_ROOT, 'wp_cli_version' => TERMINUS_VERSION);
     $labels = array('php_binary_path' => 'PHP binary', 'php_version' => 'PHP version', 'php_ini' => 'php.ini used', 'project_config_path' => 'Terminus project config', 'wp_cli_dir_path' => 'Terminus root dir', 'wp_cli_version' => 'Terminus version');
     $this->output()->outputRecord($info, $labels);
 }
開發者ID:RobLoach,項目名稱:cli,代碼行數:16,代碼來源:cli.php

示例2: testRunCommand

 public function testRunCommand()
 {
     $runner = \Terminus::getRunner();
     $this->assertInstanceOf('Terminus\\Runner', $runner);
     $args = array('site');
     $assoc_args = array('site' => 'phpunittest');
     $return = $runner->runCommand($args, $assoc_args);
     $this->assertNull($return);
 }
開發者ID:serundeputy,項目名稱:cli,代碼行數:9,代碼來源:test-runner.php

示例3: testGetRunner

 public function testGetRunner()
 {
     $runner = Terminus::getRunner();
     $this->assertTrue(strpos(get_class($runner), 'Runner') !== false);
 }
開發者ID:barkinet,項目名稱:cli,代碼行數:5,代碼來源:test-terminus.php

示例4: define

    $env = new Dotenv\Dotenv(getcwd());
    $env->load();
}
//Set a custom exception handler
//set_exception_handler('\Terminus\Utils\handle_exception');
$host = 'dashboard.pantheon.io';
if (isset($_SERVER['TERMINUS_HOST']) && $_SERVER['TERMINUS_HOST'] != '') {
    $host = $_SERVER['TERMINUS_HOST'];
}
define('TERMINUS_HOST', $host);
$port = 443;
if (isset($_SERVER['TERMINUS_PORT']) && $_SERVER['TERMINUS_PORT'] != '') {
    $port = $_SERVER['TERMINUS_PORT'];
}
define('TERMINUS_PORT', $port);
$protocol = 'https';
if (isset($_SERVER['TERMINUS_PROTOCOL']) && $_SERVER['TERMINUS_PROTOCOL'] != '') {
    $protocol = $_SERVER['TERMINUS_PROTOCOL'];
}
define('TERMINUS_PROTOCOL', $protocol);
if (isset($_SERVER['VCR_CASSETTE'])) {
    \VCR\VCR::configure()->enableRequestMatchers(array('method', 'url', 'body'));
    \VCR\VCR::configure()->setMode($_SERVER['VCR_MODE']);
    \VCR\VCR::turnOn();
    \VCR\VCR::insertCassette($_SERVER['VCR_CASSETTE']);
}
Terminus::getRunner()->run();
if (isset($_SERVER['VCR_CASSETTE'])) {
    \VCR\VCR::eject();
    \VCR\VCR::turnOff();
}
開發者ID:bjargud,項目名稱:cli,代碼行數:31,代碼來源:terminus.php


注:本文中的Terminus::getRunner方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。