本文整理汇总了PHP中Executor::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP Executor::execute方法的具体用法?PHP Executor::execute怎么用?PHP Executor::execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Executor
的用法示例。
在下文中一共展示了Executor::execute方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadFixturesFromDir
/**
* @param string $dir
* @param bool $append
*/
public function loadFixturesFromDir($dir, $append = true)
{
if (!$append) {
$this->purger->purge();
}
$this->loader->loadFromDirectory($dir);
$this->executor->execute($this->loader->getFixtures());
}
示例2: __construct
public function __construct()
{
$arr = Executor::execute("df -PB 1");
foreach ($arr as $line) {
$columns = preg_split("/ /", $line, -1, PREG_SPLIT_NO_EMPTY);
$this->df[$columns[0]] = array("capacity" => $columns[1], "used" => $columns[2], "available" => $columns[3], "percent" => $columns[4], "path" => $columns[5]);
}
}
示例3: execute
/**
* {@inheretDoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
foreach ($this->properties as $property) {
$property->setValue($input->getOption($property->getName()));
}
foreach ($this->properties as $property) {
$property->makeReady($this, $input, $output);
}
$this->executor->execute($this, $input, $output);
}
示例4: __autoload
<?php
ini_set("display_errors", "On");
error_reporting(E_ALL);
function __autoload($class)
{
require_once "php/system/{$class}.php";
}
define('DIR_HOME', __DIR__);
$common = new Common();
$config = new Config($common);
$common->set('config', $config);
if (isset($_COOKIE['dbName'])) {
$db = new DataBase($_COOKIE['dbName'], isset($_COOKIE['collName']) ? $_COOKIE['collName'] : 0);
$common->set('db', $db);
}
$request = new Request($_GET['route'], $_SERVER['REQUEST_METHOD']);
$common->set('request', $request);
$response = new Response();
$common->set('response', $response);
$action = new Action($request->getRoute(), $request->getType());
$request->setArgs($action->getArgs());
$executor = new Executor($common);
$executor->execute($action);
//var_dump($action->getClass(), $action->getMethod());
$response->output();
示例5: Executor
<?php
namespace BRS\PerformanceDiff;
$executor = new Executor('Testing getting a char in a string using indexing vs substrings.', 1000000, Executor::TARE | Executor::PROGRESS);
$executor->setPrepCallback(function ($executor) {
$string = '';
$pool = '1234567890qwertyuiopasdfghjklzxcvbnm';
while (strlen($string) > 10000) {
// hint hint...
$string .= $string[rand(0, strlen($pool) - 1)];
}
$executor->setPayload(array(strlen($string), $string));
});
$executor->setTareFunction(function ($payload) {
return rand(0, $payload[0] - 1);
});
$executor->setRerun(10);
$executor->addTest(new Test('Index', function ($payload) {
return $payload[1][rand(0, $payload[0] - 1)];
}));
$executor->addTest(new Test('Substr', function ($payload) {
return substr($string, rand(0, $payload[0]), 1);
}));
$executor->execute();
$executor->log(basename(__FILE__) . '.' . time());
示例6: applyMigrate
/**
* マイグレーションの適用
*
* @param string $version
*/
private function applyMigrate($version)
{
$fn = $this->scriptDirectory . DIRECTORY_SEPARATOR . $version;
$this->executor->execute($fn);
}