. */ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Schema\Visitor\Visitor; /** * Sequence Structure * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision$ * @author Benjamin Eberlei */ class Sequence extends AbstractAsset { /** * @var int */ protected $_allocationSize = 1; /** * @var int */ protected $_initialValue = 1; /** * * @param string $name * @param int $allocationSize * @param int $initialValue */ public function __construct($name, $allocationSize=1, $initialValue=1) { $this->_setName($name); $this->_allocationSize = (is_numeric($allocationSize))?$allocationSize:1; $this->_initialValue = (is_numeric($initialValue))?$initialValue:1; } public function getAllocationSize() { return $this->_allocationSize; } public function getInitialValue() { return $this->_initialValue; } /** * @param Visitor $visitor */ public function visit(Visitor $visitor) { $visitor->acceptSequence($this); } }