. */ /** * @package Doctrine * @url http://www.phpdoctrine.com * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @author Jukka Hassinen * @version $Id$ */ /** * class Doctrine_Schema_Column * Holds information on a database table field */ class Doctrine_Schema_Column extends Doctrine_Schema_Object implements IteratorAggregate { /** * column definitions * @var array $definition */ protected $definition = array('name' => '', 'type' => '', 'length' => null, 'unique' => false, 'primary' => false, 'notnull' => false, 'default' => false, 'autoinc' => false ); public function getName() { return $this->definition['name']; } public function getType() { return $this->definition['type']; } public function isUnique() { return $this->definition['unique']; } public function isPrimaryKey() { return $this->definition['primary']; } public function defaultValue() { return $this->definition['default']; } public function isNotNull() { return $this->definition['notnull']; } }