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


PHP Selection::execute方法代码示例

本文整理汇总了PHP中Nette\Database\Table\Selection::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP Selection::execute方法的具体用法?PHP Selection::execute怎么用?PHP Selection::execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Nette\Database\Table\Selection的用法示例。


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

示例1: execute

 protected function execute()
 {
     if ($this->rows !== NULL) {
         return;
     }
     parent::execute();
     $this->onExecute();
 }
开发者ID:redwormik,项目名称:fakeorm,代码行数:8,代码来源:Selection.php

示例2: execute

 protected function execute()
 {
     if ($this->rows !== NULL) {
         return;
     }
     $hash = md5($this->sqlBuilder->buildSelectQuery() . json_encode($this->sqlBuilder->getParameters()));
     $referencing =& $this->getRefTable($refPath)->referencing[$refPath . $hash];
     $this->rows =& $referencing['rows'];
     $this->referenced =& $referencing['refs'];
     $this->accessed =& $referencing['accessed'];
     $refData =& $referencing['data'];
     if ($refData === NULL) {
         $limit = $this->sqlBuilder->getLimit();
         $rows = count($this->refTable->rows);
         if ($limit && $rows > 1) {
             $this->sqlBuilder->setLimit(NULL, NULL);
         }
         parent::execute();
         $this->sqlBuilder->setLimit($limit, NULL);
         $refData = array();
         $offset = array();
         foreach ($this->rows as $key => $row) {
             $ref =& $refData[$row[$this->column]];
             $skip =& $offset[$row[$this->column]];
             if ($limit === NULL || $rows <= 1 || count($ref) < $limit && $skip >= $this->sqlBuilder->getOffset()) {
                 $ref[$key] = $row;
             } else {
                 unset($this->rows[$key]);
             }
             $skip++;
             unset($ref, $skip);
         }
     }
     $this->data =& $refData[$this->active];
     if ($this->data === NULL) {
         $this->data = array();
     } else {
         foreach ($this->data as $row) {
             $row->setTable($this);
             // injects correct parent GroupedSelection
         }
         reset($this->data);
     }
 }
开发者ID:BroukPytlik,项目名称:agility,代码行数:44,代码来源:GroupedSelection.php

示例3: execute

 protected function execute()
 {
     if ($this->rows !== NULL) {
         $this->observeCache = $this;
         return;
     }
     $accessedColumns = $this->accessedColumns;
     $this->loadRefCache();
     if (!isset($this->refCacheCurrent['data'])) {
         // we have not fetched any data yet => init accessedColumns by cached accessedColumns
         $this->accessedColumns = $accessedColumns;
         $limit = $this->sqlBuilder->getLimit();
         $rows = count($this->refTable->rows);
         if ($limit && $rows > 1) {
             $this->sqlBuilder->setLimit(NULL, NULL);
         }
         parent::execute();
         $this->sqlBuilder->setLimit($limit, NULL);
         $data = array();
         $offset = array();
         $this->accessColumn($this->column);
         foreach ((array) $this->rows as $key => $row) {
             $ref =& $data[$row[$this->column]];
             $skip =& $offset[$row[$this->column]];
             if ($limit === NULL || $rows <= 1 || count($ref) < $limit && $skip >= $this->sqlBuilder->getOffset()) {
                 $ref[$key] = $row;
             } else {
                 unset($this->rows[$key]);
             }
             $skip++;
             unset($ref, $skip);
         }
         $this->refCacheCurrent['data'] = $data;
         $this->data =& $this->refCacheCurrent['data'][$this->active];
     }
     $this->observeCache = $this;
     if ($this->data === NULL) {
         $this->data = array();
     } else {
         foreach ($this->data as $row) {
             $row->setTable($this);
             // injects correct parent GroupedSelection
         }
         reset($this->data);
     }
 }
开发者ID:luminousinfoways,项目名称:pccfoas,代码行数:46,代码来源:GroupedSelection.php

示例4: execute

 protected function execute()
 {
     if ($this->rows !== NULL) {
         return;
     }
     $referencing =& $this->refTable->referencing[$this->getSql()];
     if ($referencing === NULL) {
         $limit = $this->limit;
         $rows = count($this->refTable->rows);
         if ($this->limit && $rows > 1) {
             $this->limit = NULL;
         }
         parent::execute();
         $this->limit = $limit;
         $referencing = array();
         $offset = array();
         foreach ($this->rows as $key => $row) {
             $ref =& $referencing[$row[$this->column]];
             $skip =& $offset[$row[$this->column]];
             if ($limit === NULL || $rows <= 1 || count($ref) < $limit && $skip >= $this->offset) {
                 $ref[$key] = $row;
             } else {
                 unset($this->rows[$key]);
             }
             $skip++;
             unset($ref, $skip);
         }
     }
     $this->data =& $referencing[$this->active];
     if ($this->data === NULL) {
         $this->data = array();
     }
 }
开发者ID:bazo,项目名称:Tatami,代码行数:33,代码来源:GroupedSelection.php

示例5: execute

 protected function execute()
 {
     if ($this->rows !== NULL) {
         $this->observeCache = $this;
         return;
     }
     $hash = md5($this->getSql() . json_encode($this->sqlBuilder->getParameters()));
     $accessedColumns = $this->accessedColumns;
     $referencingBase =& $this->getRefTable($refPath)->referencing[$this->getCacheKey()];
     $referencing =& $referencingBase[$refPath . $hash];
     $this->rows =& $referencing['rows'];
     $this->referenced =& $referencing['refs'];
     $this->accessedColumns =& $referencing['accessed'];
     $this->observeCache =& $referencingBase['observeCache'];
     $refData =& $referencing['data'];
     if ($refData === NULL) {
         $this->accessedColumns = $accessedColumns;
         $limit = $this->sqlBuilder->getLimit();
         $rows = count($this->refTable->rows);
         if ($limit && $rows > 1) {
             $this->sqlBuilder->setLimit(NULL, NULL);
         }
         parent::execute();
         $this->sqlBuilder->setLimit($limit, NULL);
         $refData = array();
         $offset = array();
         $this->accessColumn($this->column);
         foreach ((array) $this->rows as $key => $row) {
             $ref =& $refData[$row[$this->column]];
             $skip =& $offset[$row[$this->column]];
             if ($limit === NULL || $rows <= 1 || count($ref) < $limit && $skip >= $this->sqlBuilder->getOffset()) {
                 $ref[$key] = $row;
             } else {
                 unset($this->rows[$key]);
             }
             $skip++;
             unset($ref, $skip);
         }
     }
     $this->observeCache = $this;
     $this->data =& $refData[$this->active];
     if ($this->data === NULL) {
         $this->data = array();
     } else {
         foreach ($this->data as $row) {
             $row->setTable($this);
         }
         reset($this->data);
         $this->checkReferenced = TRUE;
     }
 }
开发者ID:rotten77,项目名称:xcv,代码行数:51,代码来源:nette.min.php

示例6: execute

 protected function execute()
 {
     if ($this->rows !== NULL) {
         return;
     }
     $hash = md5($this->getSql() . json_encode($this->parameters));
     $referencing =& $this->refTable->referencing[$hash];
     if ($referencing === NULL) {
         $limit = $this->limit;
         $rows = count($this->refTable->rows);
         if ($this->limit && $rows > 1) {
             $this->limit = NULL;
         }
         parent::execute();
         $this->limit = $limit;
         $referencing = array();
         $offset = array();
         foreach ($this->rows as $key => $row) {
             $ref =& $referencing[$row[$this->column]];
             $skip =& $offset[$row[$this->column]];
             if ($limit === NULL || $rows <= 1 || count($ref) < $limit && $skip >= $this->offset) {
                 $ref[$key] = $row;
             } else {
                 unset($this->rows[$key]);
             }
             $skip++;
             unset($ref, $skip);
         }
     }
     $this->data =& $referencing[$this->active];
     if ($this->data === NULL) {
         $this->data = array();
     } else {
         foreach ($this->data as $row) {
             // update active id in the selection reference in case of requerying for another column
             // must be updated only the active key, not the Selection reference, because of caching accessed columns
             $row->getTable()->active = $this->active;
         }
         reset($this->data);
     }
 }
开发者ID:kravco,项目名称:nette,代码行数:41,代码来源:GroupedSelection.php

示例7:

delete(){$condition=array($this->where,$this->parameters);$this->where[0]="$this->delimitedColumn = ?";$this->parameters[0]=$this->active;$return=parent::delete();list($this->where,$this->parameters)=$condition;return$return;}protected
function
execute(){if($this->rows!==NULL){return;}$hash=md5($this->getSql().json_encode($this->parameters));$referencing=&$this->referencing[$hash];if($referencing===NULL){$limit=$this->limit;$rows=count($this->refTable->rows);if($this->limit&&$rows>1){$this->limit=NULL;}parent::execute();$this->limit=$limit;$referencing=array();$offset=array();foreach($this->rows
as$key=>$row){$ref=&$referencing[$row[$this->column]];$skip=&$offset[$row[$this->column]];if($limit===NULL||$rows<=1||(count($ref)<$limit&&$skip>=$this->offset)){$ref[$key]=$row;}else{unset($this->rows[$key]);}$skip++;unset($ref,$skip);}}$this->data=&$referencing[$this->active];if($this->data===NULL){$this->data=array();}else{reset($this->data);}}}}namespace Nette\DI{use
开发者ID:JanTvrdik,项目名称:NetteExtras,代码行数:4,代码来源:loader.php


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