Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Db / Sql / Ddl / Column / Date.php
blob930b89a3a5a5adcff38e982fb1e814928a83dc47
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Db\Sql\Ddl\Column;
12 class Date extends Column
14 /**
15 * @var string
17 protected $specification = '%s DATE %s %s';
19 /**
20 * @param string $name
22 public function __construct($name)
24 $this->name = $name;
27 /**
28 * @return array
30 public function getExpressionData()
32 $spec = $this->specification;
33 $params = array();
35 $types = array(self::TYPE_IDENTIFIER);
36 $params[] = $this->name;
38 $types[] = self::TYPE_LITERAL;
39 $params[] = (!$this->isNullable) ? 'NOT NULL' : '';
41 $types[] = ($this->default !== null) ? self::TYPE_VALUE : self::TYPE_LITERAL;
42 $params[] = ($this->default !== null) ? $this->default : '';
44 return array(array(
45 $spec,
46 $params,
47 $types,
48 ));