Source of file IsNull.php
Size: 1,935 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Db/Sql/Predicate/IsNull.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | <?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\Predicate; class IsNull implements PredicateInterface { /** * @var string */ protected $specification = '%1$s IS NULL'; /** * @var */ protected $identifier; /** * Constructor * * @param string $identifier */ public function __construct($identifier = null) { if ($identifier) { $this->setIdentifier($identifier); } } /** * Set identifier for comparison * * @param string $identifier * @return IsNull */ public function setIdentifier($identifier) { $this->identifier = $identifier; return $this; } /** * Get identifier of comparison * * @return null|string */ public function getIdentifier() { return $this->identifier; } /** * Set specification string to use in forming SQL predicate * * @param string $specification * @return IsNull */ public function setSpecification($specification) { $this->specification = $specification; return $this; } /** * Get specification string to use in forming SQL predicate * * @return string */ public function getSpecification() { return $this->specification; } /** * Get parts for where statement * * @return array */ public function getExpressionData() { return array(array( $this->getSpecification(), array($this->identifier), array(self::TYPE_IDENTIFIER), )); } } |