Source of file ConstraintKeyObject.php
Size: 5,052 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Db/Metadata/Object/ConstraintKeyObject.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 | <?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 ConstraintKeyObject { const FK_CASCADE = 'CASCADE'; const FK_SET_NULL = 'SET NULL'; const FK_NO_ACTION = 'NO ACTION'; const FK_RESTRICT = 'RESTRICT'; const FK_SET_DEFAULT = 'SET DEFAULT'; /** * * @var string */ protected $columnName = null; /** * * @var int */ protected $ordinalPosition = null; /** * * @var bool */ protected $positionInUniqueConstraint = null; /** * * @var string */ protected $referencedTableSchema = null; /** * * @var string */ protected $referencedTableName = null; /** * * @var string */ protected $referencedColumnName = null; /** * * @var string */ protected $foreignKeyUpdateRule = null; /** * * @var string */ protected $foreignKeyDeleteRule = null; /** * Constructor * * @param string $column */ public function __construct($column) { $this->setColumnName($column); } /** * Get column name * * @return string */ public function getColumnName() { return $this->columnName; } /** * Set column name * * @param string $columnName * @return ConstraintKeyObject */ public function setColumnName($columnName) { $this->columnName = $columnName; return $this; } /** * Get ordinal position * * @return int */ public function getOrdinalPosition() { return $this->ordinalPosition; } /** * Set ordinal position * * @param int $ordinalPosition * @return ConstraintKeyObject */ public function setOrdinalPosition($ordinalPosition) { $this->ordinalPosition = $ordinalPosition; return $this; } /** * Get position in unique constraint * * @return bool */ public function getPositionInUniqueConstraint() { return $this->positionInUniqueConstraint; } /** * Set position in unique constraint * * @param bool $positionInUniqueConstraint * @return ConstraintKeyObject */ public function setPositionInUniqueConstraint($positionInUniqueConstraint) { $this->positionInUniqueConstraint = $positionInUniqueConstraint; return $this; } /** * Get referencred table schema * * @return string */ public function getReferencedTableSchema() { return $this->referencedTableSchema; } /** * Set referenced table schema * * @param string $referencedTableSchema * @return ConstraintKeyObject */ public function setReferencedTableSchema($referencedTableSchema) { $this->referencedTableSchema = $referencedTableSchema; return $this; } /** * Get referenced table name * * @return string */ public function getReferencedTableName() { return $this->referencedTableName; } /** * Set Referenced table name * * @param string $referencedTableName * @return ConstraintKeyObject */ public function setReferencedTableName($referencedTableName) { $this->referencedTableName = $referencedTableName; return $this; } /** * Get referenced column name * * @return string */ public function getReferencedColumnName() { return $this->referencedColumnName; } /** * Set referenced column name * * @param string $referencedColumnName * @return ConstraintKeyObject */ public function setReferencedColumnName($referencedColumnName) { $this->referencedColumnName = $referencedColumnName; return $this; } /** * set foreign key update rule * * @param string $foreignKeyUpdateRule */ public function setForeignKeyUpdateRule($foreignKeyUpdateRule) { $this->foreignKeyUpdateRule = $foreignKeyUpdateRule; } /** * Get foreign key update rule * * @return string */ public function getForeignKeyUpdateRule() { return $this->foreignKeyUpdateRule; } /** * Set foreign key delete rule * * @param string $foreignKeyDeleteRule */ public function setForeignKeyDeleteRule($foreignKeyDeleteRule) { $this->foreignKeyDeleteRule = $foreignKeyDeleteRule; } /** * get foreign key delete rule * * @return string */ public function getForeignKeyDeleteRule() { return $this->foreignKeyDeleteRule; } } |