当前位置: 首页>>代码示例>>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;未经允许,请勿转载。