projects
/
m6w6
/
pq-gateway
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
manage properties where they belong
[m6w6/pq-gateway]
/
lib
/
pq
/
Gateway
/
Cell.php
diff --git
a/lib/pq/Gateway/Cell.php
b/lib/pq/Gateway/Cell.php
index 3c69a1294d015111db7629aee7234cb5e550dc45..ab2a46fceac95a3a97056fe78bdc4679c20ca2da 100644
(file)
--- a/
lib/pq/Gateway/Cell.php
+++ b/
lib/pq/Gateway/Cell.php
@@
-11,11
+11,6
@@
class Cell extends Expressible implements \ArrayAccess
*/
protected $row;
*/
protected $row;
- /**
- * @var string
- */
- protected $name;
-
/**
* @var bool
*/
/**
* @var bool
*/
@@
-28,9
+23,8
@@
class Cell extends Expressible implements \ArrayAccess
* @param bool $dirty
*/
function __construct(Row $row, $name, $data, $dirty = false) {
* @param bool $dirty
*/
function __construct(Row $row, $name, $data, $dirty = false) {
- parent::__construct($data);
+ parent::__construct($
name, $
data);
$this->row = $row;
$this->row = $row;
- $this->name = $name;
$this->dirty = $dirty;
}
$this->dirty = $dirty;
}
@@
-68,6
+62,9
@@
class Cell extends Expressible implements \ArrayAccess
* @return \pq\Gateway\Cell
*/
function mod($data, $op = null) {
* @return \pq\Gateway\Cell
*/
function mod($data, $op = null) {
+ if (is_string($data)) {
+ $data = $this->row->getTable()->getConnection()->quote($data);
+ }
parent::mod($data, $op);
$this->dirty = true;
return $this;
parent::mod($data, $op);
$this->dirty = true;
return $this;