Пример #1
0
 public function __construct($logger)
 {
     $this->logger = $logger;
     $this->map = new Map($logger);
     $this->wordpress = new \WPUtilities\WordPressWrapper();
     $this->httpEngine = new \HttpExchange\Adapters\Resty(new \Resty\Resty());
     $this->apiBase = \WPUtilities\API::getApiBase();
 }
Пример #2
0
 public function fetch($id)
 {
     $apiBase = \WPUtilities\API::getApiBase();
     $map = $this->api->get("/{$id}")->data;
     return $map->meta->locations;
 }
Пример #3
0
 public function __construct()
 {
     $this->http = new \HttpExchange\Adapters\Resty(new \Resty());
     $this->apiBase = \WPUtilities\API::getApiBase();
 }