client = $client; } /** * Initiate a new query object * * @return GraphiteQuery */ public function select() { return new GraphiteQuery($this); } /** * Get {@link client} * * @return GraphiteWebClientInterface */ public function getClient() { return $this->client; } /** * Retrieve a list of metrics fitting the given filter * * @return array */ public function listMetrics($filter) { $res = json_decode($this->client->request('metrics/expand', ['query' => $filter])); natsort($res->results); return array_values($res->results); } }