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


PHP Selection::getReferencingTable方法代码示例

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


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

示例1: related

 /**
  * Returns referencing rows.
  * @param  string
  * @param  string
  * @return GroupedSelection
  */
 public function related($key, $throughColumn = NULL)
 {
     if (strpos($key, '.') !== FALSE) {
         list($key, $throughColumn) = explode('.', $key);
     }
     list($table, $column) = $this->table->getConnection()->getDatabaseReflection()->getHasManyReference($this->table->getName(), $key);
     return $this->table->getReferencingTable($table, $throughColumn ?: $column, $this[$this->table->getPrimary()]);
 }
开发者ID:exesek,项目名称:nette20login,代码行数:14,代码来源:ActiveRow.php

示例2: related

 /**
  * Returns referencing rows.
  * @param  string
  * @param  string
  * @return GroupedSelection
  */
 public function related($key, $throughColumn = NULL)
 {
     $groupedSelection = $this->table->getReferencingTable($key, $throughColumn, $this[$this->table->getPrimary()]);
     if (!$groupedSelection) {
         throw new Nette\MemberAccessException("No reference found for \${$this->table->name}->related({$key}).");
     }
     return $groupedSelection;
 }
开发者ID:ricco24,项目名称:database,代码行数:14,代码来源:ActiveRow.php

示例3: related

 /**
  * Returns referencing rows.
  *
  * @param  string
  * @param  string
  *
  * @return GroupedSelection
  */
 public function related($key, $throughColumn = null)
 {
     if (strpos($key, '.') !== false) {
         list($key, $throughColumn) = explode('.', $key);
     } elseif (!$throughColumn) {
         list($key, $throughColumn) = $this->table->getConnection()->getDatabaseReflection()->getHasManyReference($this->table->getName(), $key);
     }
     return $this->table->getReferencingTable($key, $throughColumn, $this[$this->table->getPrimary()]);
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:17,代码来源:ActiveRow.php

示例4: related

 /**
  * Returns referencing rows.
  * @param  string
  * @param  string
  * @param  bool
  * @return GroupedSelection
  */
 public function related($key, $throughColumn = NULL, $forceNewInstance = FALSE)
 {
     if (strpos($key, '.') !== FALSE) {
         list($key, $throughColumn) = explode('.', $key);
     } elseif (!is_string($throughColumn)) {
         list($key, $throughColumn) = $this->table->getConnection()->getDatabaseReflection()->getHasManyReference($this->table->getName(), $key);
     }
     return $this->table->getReferencingTable($key, $throughColumn, $this[$this->table->getPrimary()], $forceNewInstance);
 }
开发者ID:JanVoracek,项目名称:nette,代码行数:16,代码来源:ActiveRow.php

示例5: related

 /**
  * Returns referencing rows.
  * @param  string table name
  * @return GroupedSelection
  */
 public function related($table)
 {
     $referencing = $this->table->getReferencingTable($table);
     $referencing->active = $this[$this->table->primary];
     return $referencing;
 }
开发者ID:kovkus,项目名称:r-cms,代码行数:11,代码来源:ActiveRow.php


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