Source of file DbTableGatewayOptions.php
Size: 4,238 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Session/SaveHandler/DbTableGatewayOptions.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 | <?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\Session\SaveHandler; use Zend\Session\Exception; use Zend\Stdlib\AbstractOptions; /** * DbTableGateway Save Handler Options */ class DbTableGatewayOptions extends AbstractOptions { /** * ID Column * @var string */ protected $idColumn = 'id'; /** * Name Column * @var string */ protected $nameColumn = 'name'; /** * Data Column * @var string */ protected $dataColumn = 'data'; /** * Lifetime Column * @var string */ protected $lifetimeColumn = 'lifetime'; /** * Modified Column * @var string */ protected $modifiedColumn = 'modified'; /** * Set Id Column * * @param string $idColumn * @return DbTableGatewayOptions * @throws Exception\InvalidArgumentException */ public function setIdColumn($idColumn) { $idColumn = (string) $idColumn; if (strlen($idColumn) === 0) { throw new Exception\InvalidArgumentException('$idColumn must be a non-empty string'); } $this->idColumn = $idColumn; return $this; } /** * Get Id Column * * @return string */ public function getIdColumn() { return $this->idColumn; } /** * Set Name Column * * @param string $nameColumn * @return DbTableGatewayOptions * @throws Exception\InvalidArgumentException */ public function setNameColumn($nameColumn) { $nameColumn = (string) $nameColumn; if (strlen($nameColumn) === 0) { throw new Exception\InvalidArgumentException('$nameColumn must be a non-empty string'); } $this->nameColumn = $nameColumn; return $this; } /** * Get Name Column * * @return string */ public function getNameColumn() { return $this->nameColumn; } /** * Set Data Column * * @param string $dataColumn * @return DbTableGatewayOptions * @throws Exception\InvalidArgumentException */ public function setDataColumn($dataColumn) { $dataColumn = (string) $dataColumn; if (strlen($dataColumn) === 0) { throw new Exception\InvalidArgumentException('$dataColumn must be a non-empty string'); } $this->dataColumn = $dataColumn; return $this; } /** * Get Data Column * * @return string */ public function getDataColumn() { return $this->dataColumn; } /** * Set Lifetime Column * * @param string $lifetimeColumn * @return DbTableGatewayOptions * @throws Exception\InvalidArgumentException */ public function setLifetimeColumn($lifetimeColumn) { $lifetimeColumn = (string) $lifetimeColumn; if (strlen($lifetimeColumn) === 0) { throw new Exception\InvalidArgumentException('$lifetimeColumn must be a non-empty string'); } $this->lifetimeColumn = $lifetimeColumn; return $this; } /** * Get Lifetime Column * * @return string */ public function getLifetimeColumn() { return $this->lifetimeColumn; } /** * Set Modified Column * * @param string $modifiedColumn * @return DbTableGatewayOptions * @throws Exception\InvalidArgumentException */ public function setModifiedColumn($modifiedColumn) { $modifiedColumn = (string) $modifiedColumn; if (strlen($modifiedColumn) === 0) { throw new Exception\InvalidArgumentException('$modifiedColumn must be a non-empty string'); } $this->modifiedColumn = $modifiedColumn; return $this; } /** * Get Modified Column * * @return string */ public function getModifiedColumn() { return $this->modifiedColumn; } } |