Source of file CreateTableDecorator.php
Size: 1,627 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Db/Sql/Platform/SqlServer/Ddl/CreateTableDecorator.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | <?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\Sql\Platform\SqlServer\Ddl; use Zend\Db\Adapter\Platform\PlatformInterface; use Zend\Db\Sql\Ddl\CreateTable; use Zend\Db\Sql\Platform\PlatformDecoratorInterface; class CreateTableDecorator extends CreateTable implements PlatformDecoratorInterface { /** * @var CreateTable */ protected $createTable; /** * @param CreateTable $subject * @return self */ public function setSubject($subject) { $this->createTable = $subject; return $this; } /** * @param null|PlatformInterface $platform * @return string */ public function getSqlString(PlatformInterface $platform = null) { // localize variables foreach (get_object_vars($this->createTable) as $name => $value) { $this->{$name} = $value; } return parent::getSqlString($platform); } /** * @param PlatformInterface $adapterPlatform * @return array */ protected function processTable(PlatformInterface $adapterPlatform = null) { $ret = array(''); if ($this->isTemporary) { $table = '#'; } else { $table = ''; } $ret[] = $adapterPlatform->quoteIdentifier($table . ltrim($this->table, '#')); return $ret; } } |