コード例 #1
0
ファイル: Index.php プロジェクト: aviogram/dal
 /**
  * Get a single column from the index
  *
  * @param  integer $index   The column position in the index. (0 indexed)
  *
  * @return Column
  * @throws Exception\Table
  */
 public function getColumn($index)
 {
     if ($this->columns->offsetExists($index) === false) {
         throw Exception\Index::columnDoesNotExists($this->getName(), $index);
     }
     return $this->columns->offsetGet($index);
 }
コード例 #2
0
ファイル: RelationManyToMany.php プロジェクト: aviogram/dal
 /**
  * Get a local column
  *
  * @param  string $name
  *
  * @return Column
  * @throws Exception\Table
  */
 public function getForeignForeignColumn($name)
 {
     $alias = $this->normalizeName($name);
     if ($this->foreignForeignColumns->offsetExists($alias) === false) {
         throw Exception\Relation::foreignForeignColumnDoesNotExists($alias, $this->foreignForeignColumns);
     }
     return $this->foreignForeignColumns->offsetGet($alias);
 }