示例#1
0
 public function onExecute(\UniMapper\Adapter\IQuery $query)
 {
     $result = $this->database->execute($query->getRaw());
     $callback = $query->callback;
     if ($callback) {
         return $callback($result);
     }
     return $result;
 }
示例#2
0
 protected function onExecute(IQuery $query)
 {
     if ($query->method === Query::PUT) {
         if ($query->filter) {
             $query->data[$query->evidence]["@filter"] = $query->filter;
         }
         $result = $this->put($query->getRaw(), $query->data);
     } elseif ($query->method === Query::GET) {
         $result = $this->get($query->getRaw());
     } elseif ($query->method === Query::DELETE) {
         $result = $this->delete($query->getRaw());
     }
     $callback = $query->resultCallback;
     if ($callback) {
         return $callback($result, $query);
     }
     return $result;
 }
示例#3
0
 protected function onExecute(IQuery $query)
 {
     $result = $this->send($query->getRaw(), $query->method, $query->data);
     $callback = $query->resultCallback;
     if ($callback) {
         return $callback($result, $query);
     }
     return $result;
 }