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