예제 #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
 /**
  * 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);
 }