本文整理汇总了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);
}
示例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);
}
示例3: testGetRunner
public function testGetRunner()
{
$runner = Terminus::getRunner();
$this->assertTrue(strpos(get_class($runner), 'Runner') !== false);
}
示例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();
}