Exemple #1
0
 /**
  * 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);
 }
Exemple #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);
 }