X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=blobdiff_plain;f=lib%2Fpq%2FQuery%2FExpressible.php;h=d123d8d8cc5fc2ea0816f282f6452d217e6af6ba;hp=dc2db66fdfffacd62ad9bfaca65fb58850d2c167;hb=002783858d3a859b1bbae977cc6db4ed13ca0187;hpb=409fca54acfee2db6c62540a8f67b1adfa695a38 diff --git a/lib/pq/Query/Expressible.php b/lib/pq/Query/Expressible.php index dc2db66..d123d8d 100644 --- a/lib/pq/Query/Expressible.php +++ b/lib/pq/Query/Expressible.php @@ -4,12 +4,22 @@ namespace pq\Query; class Expressible implements ExpressibleInterface { + /** + * @var string + */ + protected $name; + /** * @var mixed */ protected $data; - function __construct($data) { + /** + * @param string $name + * @param mixed $data + */ + function __construct($name, $data) { + $this->name = $name; $this->data = $data; } @@ -63,9 +73,6 @@ class Expressible implements ExpressibleInterface } elseif (!isset($op) && is_numeric($data)) { $this->data->add(new Expr("+ $data")); } else { - if (!is_array($data)) { - $data = $this->row->getTable()->getConnection()->quote($data); - } $this->data->add(new Expr("%s %s", isset($op) ? $op : "||", $data)); }