vendor\project-biz\database-bundle\src\Database\Criteria\CriteriaConstant.php line 28

Open in your IDE?
  1. <?php
  2. namespace ProjectBiz\DatabaseBundle\Database\Criteria;
  3. use Doctrine\DBAL\Query\QueryBuilder;
  4. class CriteriaConstant implements CriteriaBuilderInterface\JsonSerializable
  5. {
  6.     private $value;
  7.     public function __construct($value)
  8.     {
  9.         $this->value $value;
  10.     }
  11.     public function buildCriteria(QueryBuilder $builder, array $columnMap$processedView$mt_name 'mt')
  12.     {
  13.         return $builder->createNamedParameter($this->value);
  14.     }
  15.     /**
  16.      * (PHP 5 &gt;= 5.4.0)<br/>
  17.      * Specify data which should be serialized to JSON
  18.      * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
  19.      * @return mixed data which can be serialized by <b>json_encode</b>,
  20.      * which is a value of any type other than a resource.
  21.      */
  22.     public function jsonSerialize()
  23.     {
  24.         return [
  25.             'type'  => 'constant',
  26.             'value' => $this->value
  27.         ];
  28.     }
  29. }