• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Executor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Executor的典型用法代码示例。如果您正苦于以下问题:PHP Executor类的具体用法?PHP Executor怎么用?PHP Executor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Executor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: testFlush

 public function testFlush()
 {
     $streams = $this->provideStreams();
     $executor = new Executor();
     $this->assertSame(0, $executor->flush('echo foo', $streams));
     rewind($streams[0]);
     $this->assertSame('', fread($streams[0], 1024));
     rewind($streams[1]);
     $this->assertSame("foo\r\n", fread($streams[1], 1024));
     rewind($streams[2]);
     $this->assertSame('', fread($streams[2], 1024));
 }
开发者ID:raphhh,项目名称:trex-cli,代码行数:12,代码来源:ExecutorTest.php


示例2: run

 /**
  * Call this function to execute jobs which are due to occur now.
  */
 public function run()
 {
     $jobs = $this->jobFinder->find();
     if (is_null($jobs)) {
         return;
     }
     foreach ($jobs as $job) {
         // TODO Should jobs be locked prior to running them?
         $start = date('Y-m-d H:i:s', time());
         $executor = new Executor($job);
         $response = $executor->run();
         $finish = date('Y-m-d H:i:s', time());
         $this->addJobToHistory($job, $response, $start, $finish);
         $this->sendNotifications($job, $response, $start, $finish);
     }
 }
开发者ID:ryanhend,项目名称:Internal,代码行数:19,代码来源:ExecutionManager.php


示例3: getAllByPopular

 public static function getAllByPopular()
 {
     //		$sql = "select * from ".self::$tablename;
     $sql = "select *,count(*) as total from " . self::$tablename . " group by channel_id limit 10";
     $query = Executor::doit($sql);
     return Model::many($query[0], new FollowerData());
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:7,代码来源:FollowerData.php


示例4: __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


示例5: one_object

 public static function one_object($sql)
 {
     $query = Executor::doit($sql);
     $cnt = 0;
     $found = null;
     $data = null;
     while ($r = $query[0]->fetch_object()) {
         $data = $r;
         $found = $data;
         break;
     }
     return $found;
 }
开发者ID:CloudGt,项目名称:suggbox-php,代码行数:13,代码来源:Model.php


示例6: getByName

 public static function getByName($name)
 {
     $sql = "select * from " . self::$tablename . " where name=\"{$name}\"";
     $query = Executor::doit($sql);
     $found = null;
     $data = new StatusData();
     while ($r = $query->fetch_array()) {
         $data->id = $r['id'];
         $data->name = $r['name'];
         $found = $data;
         break;
     }
     return $found;
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:14,代码来源:StatusData.php


示例7: PHP_debug_backtrace

function PHP_debug_backtrace(Executor $executor, array $args, Zval $return)
{
    $array = array();
    $current = $executor->getCurrent();
    while ($current->parent) {
        $parent = $current->parent;
        $ret = array('line' => $parent->opLine->attributes['startLine'], 'file' => $parent->opArray->getFileName());
        if ($current->function) {
            if ($current->ci) {
                $ret['class'] = $current->ci->getClassEntry()->getName();
                $ret['object'] = $current->ci;
                $ret['type'] = '->';
                $ret['function'] = $current->ci->getClassEntry()->getMethodStore()->getName($current->function);
            } else {
                $ret['function'] = $current->executor->getFunctionStore()->getName($current->function);
            }
            $ret['args'] = $current->arguments;
        }
        $array[] = $ret;
        $current = $parent;
    }
    $return->setValue($array);
}
开发者ID:asgrim,项目名称:PHPPHP,代码行数:23,代码来源:Functions.php


示例8: getAll

 public static function getAll()
 {
     $sql = "select * from " . self::$tablename;
     $query = Executor::doit($sql);
     $array = array();
     $cnt = 0;
     while ($r = $query->fetch_array()) {
         $array[$cnt] = new UserTypeData();
         $array[$cnt]->id = $r['id'];
         $array[$cnt]->name = $r['name'];
         $cnt++;
     }
     return $array;
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:14,代码来源:UserTypeData.php


示例9: getAll

 public static function getAll()
 {
     $sql = "select * from " . self::$tablename . " order by created_at desc";
     $query = Executor::doit($sql);
     $array = array();
     $cnt = 0;
     while ($r = $query[0]->fetch_array()) {
         $array[$cnt] = new OperationTypeData();
         $array[$cnt]->id = $r['id'];
         $array[$cnt]->name = $r['name'];
         $cnt++;
     }
     return $array;
 }
开发者ID:kpocha,项目名称:inventio-lite,代码行数:14,代码来源:OperationTypeData.php


示例10: getLike

 public static function getLike($q)
 {
     $sql = "select * from " . self::$tablename . " where name like '%{$q}%'";
     $query = Executor::doit($sql);
     $array = array();
     $cnt = 0;
     while ($r = $query[0]->fetch_array()) {
         $array[$cnt] = new BoxData();
         $array[$cnt]->id = $r['id'];
         $array[$cnt]->created_at = $r['created_at'];
         $cnt++;
     }
     return $array;
 }
开发者ID:leanet,项目名称:inventio-lite,代码行数:14,代码来源:BoxData.php


示例11: Event_handler

function Event_handler($handler)
{
    if (is_object($handler)) {
        return array('type' => 'object', 'object' => $handler, 'event_handler' => true);
    } elseif (is_string($handler) && class_exists($handler)) {
        return array('type' => 'class', 'class' => $handler, 'event_handler' => true);
    } else {
        if (is_array($handler)) {
            return array('type' => 'bootable', 'boot' => \Collection::create($handler), 'event_handler' => true);
        } else {
            return array('type' => 'bootable', 'boot' => \Executor::create($handler), 'event_handler' => true);
        }
    }
}
开发者ID:silversthem,项目名称:simPHPle,代码行数:14,代码来源:controller.php


示例12: getAll

 public static function getAll()
 {
     $sql = "select * from " . self::$tablename . " order by created_at desc";
     $query = Executor::doit($sql);
     $array = array();
     $cnt = 0;
     while ($r = $query->fetch_array()) {
         $array[$cnt] = new AlbumImageData();
         $array[$cnt]->album_id = $r['album_id'];
         $array[$cnt]->image_id = $r['image_id'];
         $array[$cnt]->created_at = $r['created_at'];
         $cnt++;
     }
     return $array;
 }
开发者ID:evilnapsis,项目名称:imayik,代码行数:15,代码来源:AlbumImageData.php


示例13: __call

 /**
  * Catch all calls, fire events and remap to real instance
  *
  * @access public
  * @param string $method
  * @param array $args
  * @return mixed
  */
 public function __call($method, array $args = array())
 {
     $event = $this->observer->createEvent()->setMethod($method)->setParams($args)->setInstance($this)->setType('before');
     $before = $this->observer->trigger()->getResult();
     if ($event->isPropagationStopped()) {
         return $before;
     }
     /** @var \Closure $closure */
     if ($closure = $this->observer->bound($method)) {
         $callback = $closure->bindTo($this, $this);
         $result = Executor::callClosure($callback, $event->getParams());
     } else {
         $result = Executor::call($this(true), $method, $event->getParams());
     }
     $event->setType('after')->setResult($result);
     return $this->observer->trigger()->getResult();
 }
开发者ID:ed-fruty,项目名称:strange-observer,代码行数:25,代码来源:Invoker.php


示例14: getAll

 public static function getAll()
 {
     $sql = "select * from " . self::$tablename . "";
     $query = Executor::doit($sql);
     $array = array();
     $cnt = 0;
     while ($r = $query[0]->fetch_array()) {
         $array[$cnt] = new ThemeData();
         $array[$cnt]->id = $r['id'];
         $array[$cnt]->name = $r['name'];
         $array[$cnt]->header_background_color = $r['header_background_color'];
         $array[$cnt]->header_text_color = $r['header_text_color'];
         $array[$cnt]->body_background_color = $r['body_background_color'];
         $array[$cnt]->body_text_color = $r['body_text_color'];
         $cnt++;
     }
     return $array;
 }
开发者ID:evilnapsis,项目名称:cazueliyas,代码行数:18,代码来源:ThemeData.php


示例15: getInputByProductIdCutIdYesF

 public static function getInputByProductIdCutIdYesF($product_id, $cut_id)
 {
     $sql = "select * from " . self::$tablename . " where product_id={$product_id} and cut_id={$cut_id} and operation_type_id=1 order by created_at desc";
     $query = Executor::doit($sql);
     return Model::many($query[0], new OperationData());
 }
开发者ID:kpocha,项目名称:inventio-lite,代码行数:6,代码来源:OperationData.php


示例16: delete

 function delete($where)
 {
     $this->sql = "delete from " . $this->tablename . " where {$where}";
     return Executor::doit($this->sql);
 }
开发者ID:CloudGt,项目名称:suggbox-php,代码行数:5,代码来源:Criteria.php


示例17: getAllByUserId

 public static function getAllByUserId($user_id)
 {
     $sql = "select * from " . self::$tablename . " where user_id={$user_id} order by created_at desc";
     $query = Executor::doit($sql);
     return Model::many($query[0], new ProductData());
 }
开发者ID:evilnapsis,项目名称:thunder,代码行数:6,代码来源:ProductData.php


示例18: getLike

 public static function getLike($q)
 {
     $sql = "select * from " . self::$tablename . " inner join profile on (user.id=profile.user_id) where name like '%{$q}%' or lastname like '%{$q}%' ";
     $query = Executor::doit($sql);
     return Model::many($query[0], new UserData());
 }
开发者ID:rogelino,项目名称:smile,代码行数:6,代码来源:UserData.php


示例19: getAllByUserId

 public static function getAllByUserId($user_id)
 {
     $sql = "select * from " . self::$tablename . " where user_id={$user_id} order by created_at desc";
     $query = Executor::doit($sql);
     $array = array();
     $cnt = 0;
     while ($r = $query[0]->fetch_array()) {
         $array[$cnt] = new ProductData();
         $array[$cnt]->id = $r['id'];
         $array[$cnt]->name = $r['name'];
         $array[$cnt]->price_in = $r['price_in'];
         $array[$cnt]->price_out = $r['price_out'];
         $array[$cnt]->presentation = $r['presentation'];
         $array[$cnt]->unit = $r['unit'];
         $array[$cnt]->user_id = $r['user_id'];
         $array[$cnt]->created_at = $r['created_at'];
         $cnt++;
     }
     return $array;
 }
开发者ID:evilnapsis,项目名称:cazueliyas,代码行数:20,代码来源:ProductData.php


示例20: getLike

 public static function getLike($q)
 {
     $sql = "select * from " . self::$tablename . " where title like '%{$q}%' or content like '%{$q}%'";
     $query = Executor::doit($sql);
     $array = array();
     $cnt = 0;
     while ($r = $query[0]->fetch_array()) {
         $array[$cnt] = new PostData();
         $array[$cnt]->id = $r['id'];
         $array[$cnt]->title = $r['title'];
         $array[$cnt]->content = $r['content'];
         $array[$cnt]->image = $r['image'];
         $array[$cnt]->is_public = $r['is_public'];
         $array[$cnt]->user_id = $r['user_id'];
         $array[$cnt]->created_at = $r['created_at'];
         $cnt++;
     }
     return $array;
 }
开发者ID:leanet,项目名称:inventio-lite,代码行数:19,代码来源:PostData.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Exercise类代码示例发布时间:2022-05-23
下一篇:
PHP ExecFuture类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap