baseUrl = $baseUrl; } /** * Initiate a new query object * * @return GraphiteQuery */ public function select() { return new GraphiteQuery($this); } /** * Retrieve out base url * * @return string */ public function getBaseUrl() { return $this->baseUrl; } /** * Retrieve a list of metrics fitting the given filter * * @return array */ public function listMetrics($filter) { $res = json_decode( file_get_contents( $this->baseUrl . '/metrics/expand?query=' . $filter ) ); natsort($res->results); return array_values($res->results); } }