当前位置: 首页>>代码示例>>PHP>>正文


PHP Executor::execute方法代码示例

本文整理汇总了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());
 }
开发者ID:starsw001,项目名称:solarium,代码行数:12,代码来源:FixtureLoader.php

示例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]);
     }
 }
开发者ID:serverfarmer,项目名称:sf-farm-inspector,代码行数:8,代码来源:space.php

示例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);
 }
开发者ID:jezhalford,项目名称:stam,代码行数:13,代码来源:TaskCommand.php

示例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();
开发者ID:rmakarov94,项目名称:dbk,代码行数:26,代码来源:index.php

示例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());
开发者ID:thebeline,项目名称:php-perfdiff-lib,代码行数:26,代码来源:index_vs_substr.php

示例6: applyMigrate

 /**
  * マイグレーションの適用
  *
  * @param string $version
  */
 private function applyMigrate($version)
 {
     $fn = $this->scriptDirectory . DIRECTORY_SEPARATOR . $version;
     $this->executor->execute($fn);
 }
开发者ID:sickhye,项目名称:php-db-migrate,代码行数:10,代码来源:Manager.php


注:本文中的Executor::execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。