. */ Doctrine::autoload('Doctrine_Schema_Object'); /** * class Doctrine_Schema_Column * Holds information on a database table field * * @package Doctrine * @subpackage Schema * @link www.phpdoctrine.com * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @since 1.0 * @version $Revision$ * @author Konsta Vesterinen * @author Jukka Hassinen */ 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']; } }