*/
protected $query;
+ /**
+ * @var array
+ */
+ protected $result;
+
/**
* Queue this call to the API client
*/
}
function __invoke(callable $callback) {
- if ($this->readFromCache($cached)) {
- call_user_func_array($callback, $cached);
+ if ($this->readFromCache($this->result)) {
+ call_user_func_array($callback, $this->result);
} else {
$this->enqueue($callback);
}
* Call Client::send()
*/
function send() {
- return $this->api->getClient()->send();
+ $this->api->getClient()->send();
+ return $this->result;
}
/**