X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=lib%2Fpq%2FGateway%2FTable%2FRelations.php;fp=lib%2Fpq%2FGateway%2FTable%2FRelations.php;h=0f946fa1154feca0dc0ac84be3a65b9f1caa3a73;hb=7045a269b4993d414337fcd7ee1b789b15185af4;hp=0000000000000000000000000000000000000000;hpb=5c1b63644ccb9277f4dec5e8a14ab6592f1677c5;p=m6w6%2Fpq-gateway diff --git a/lib/pq/Gateway/Table/Relations.php b/lib/pq/Gateway/Table/Relations.php new file mode 100644 index 0000000..0f946fa --- /dev/null +++ b/lib/pq/Gateway/Table/Relations.php @@ -0,0 +1,59 @@ +references = $table->getConnection() + ->execParams(RELATION_SQL, array($table->getName())) + ->map(array(0,1), array(2,3,4), \pq\Result::FETCH_OBJECT); + } + + function __isset($r) { + return isset($this->references->$r); + } + + function __get($r) { + return $this->references->$r; + } + + function __set($r, $v) { + $this->references->$r = $v; + } + + function __unset($r){ + unset($this->references->$r); + } +}