Source of file ColumnObject.php
Size: 7,324 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Db/Metadata/Object/ColumnObject.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390 | <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Db\Metadata\Object; class ColumnObject { /** * * @var string */ protected $name = null; /** * * @var string */ protected $tableName = null; /** * * @var string */ protected $schemaName = null; /** * * @var */ protected $ordinalPosition = null; /** * * @var string */ protected $columnDefault = null; /** * * @var bool */ protected $isNullable = null; /** * * @var string */ protected $dataType = null; /** * * @var int */ protected $characterMaximumLength = null; /** * * @var int */ protected $characterOctetLength = null; /** * * @var int */ protected $numericPrecision = null; /** * * @var int */ protected $numericScale = null; /** * * @var bool */ protected $numericUnsigned = null; /** * * @var array */ protected $errata = array(); /** * Constructor * * @param string $name * @param string $tableName * @param string $schemaName */ public function __construct($name, $tableName, $schemaName = null) { $this->setName($name); $this->setTableName($tableName); $this->setSchemaName($schemaName); } /** * Set name * * @param string $name */ public function setName($name) { $this->name = $name; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Get table name * * @return string */ public function getTableName() { return $this->tableName; } /** * Set table name * * @param string $tableName * @return ColumnObject */ public function setTableName($tableName) { $this->tableName = $tableName; return $this; } /** * Set schema name * * @param string $schemaName */ public function setSchemaName($schemaName) { $this->schemaName = $schemaName; } /** * Get schema name * * @return string */ public function getSchemaName() { return $this->schemaName; } /** * @return int $ordinalPosition */ public function getOrdinalPosition() { return $this->ordinalPosition; } /** * @param int $ordinalPosition to set * @return ColumnObject */ public function setOrdinalPosition($ordinalPosition) { $this->ordinalPosition = $ordinalPosition; return $this; } /** * @return null|string the $columnDefault */ public function getColumnDefault() { return $this->columnDefault; } /** * @param mixed $columnDefault to set * @return ColumnObject */ public function setColumnDefault($columnDefault) { $this->columnDefault = $columnDefault; return $this; } /** * @return bool $isNullable */ public function getIsNullable() { return $this->isNullable; } /** * @param bool $isNullable to set * @return ColumnObject */ public function setIsNullable($isNullable) { $this->isNullable = $isNullable; return $this; } /** * @return bool $isNullable */ public function isNullable() { return $this->isNullable; } /** * @return null|string the $dataType */ public function getDataType() { return $this->dataType; } /** * @param string $dataType the $dataType to set * @return ColumnObject */ public function setDataType($dataType) { $this->dataType = $dataType; return $this; } /** * @return int|null the $characterMaximumLength */ public function getCharacterMaximumLength() { return $this->characterMaximumLength; } /** * @param int $characterMaximumLength the $characterMaximumLength to set * @return ColumnObject */ public function setCharacterMaximumLength($characterMaximumLength) { $this->characterMaximumLength = $characterMaximumLength; return $this; } /** * @return int|null the $characterOctetLength */ public function getCharacterOctetLength() { return $this->characterOctetLength; } /** * @param int $characterOctetLength the $characterOctetLength to set * @return ColumnObject */ public function setCharacterOctetLength($characterOctetLength) { $this->characterOctetLength = $characterOctetLength; return $this; } /** * @return int the $numericPrecision */ public function getNumericPrecision() { return $this->numericPrecision; } /** * @param int $numericPrecision the $numericPrevision to set * @return ColumnObject */ public function setNumericPrecision($numericPrecision) { $this->numericPrecision = $numericPrecision; return $this; } /** * @return int the $numericScale */ public function getNumericScale() { return $this->numericScale; } /** * @param int $numericScale the $numericScale to set * @return ColumnObject */ public function setNumericScale($numericScale) { $this->numericScale = $numericScale; return $this; } /** * @return bool */ public function getNumericUnsigned() { return $this->numericUnsigned; } /** * @param bool $numericUnsigned * @return ColumnObject */ public function setNumericUnsigned($numericUnsigned) { $this->numericUnsigned = $numericUnsigned; return $this; } /** * @return bool */ public function isNumericUnsigned() { return $this->numericUnsigned; } /** * @return array the $errata */ public function getErratas() { return $this->errata; } /** * @param array $erratas * @return ColumnObject */ public function setErratas(array $erratas) { foreach ($erratas as $name => $value) { $this->setErrata($name, $value); } return $this; } /** * @param string $errataName * @return mixed */ public function getErrata($errataName) { if (array_key_exists($errataName, $this->errata)) { return $this->errata[$errataName]; } return null; } /** * @param string $errataName * @param mixed $errataValue * @return ColumnObject */ public function setErrata($errataName, $errataValue) { $this->errata[$errataName] = $errataValue; return $this; } } |