Source of file Like.php
Size: 2,080 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/Db/Sql/Predicate/Like.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 | <?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 Like implements PredicateInterface { /** * @var string */ protected $specification = '%1$s LIKE %2$s'; /** * @var string */ protected $identifier = ''; /** * @var string */ protected $like = ''; /** * @param string $identifier * @param string $like */ public function __construct($identifier = null, $like = null) { if ($identifier) { $this->setIdentifier($identifier); } if ($like) { $this->setLike($like); } } /** * @param string $identifier * @return self */ public function setIdentifier($identifier) { $this->identifier = $identifier; return $this; } /** * @return string */ public function getIdentifier() { return $this->identifier; } /** * @param string $like * @return self */ public function setLike($like) { $this->like = $like; return $this; } /** * @return string */ public function getLike() { return $this->like; } /** * @param string $specification * @return self */ public function setSpecification($specification) { $this->specification = $specification; return $this; } /** * @return string */ public function getSpecification() { return $this->specification; } /** * @return array */ public function getExpressionData() { return array( array($this->specification, array($this->identifier, $this->like), array(self::TYPE_IDENTIFIER, self::TYPE_VALUE)) ); } } |