/** * Public function to fetch a resource. Optional arguments passed include: * with => include certain related resources in the returned data * * @param string $path * @param array $args * @return array $response */ public function fetch($path, $args = array()) { $rsc = $this->parser->resource($path); $found = $rsc; if (!$found) { $rsc = new Rframe_StaticResource($this->parser); $rsc->code = Rframe::BAD_PATH; $rsc->message = "Invalid path: '{$path}'"; } $uuid = $this->parser->uuid($path); return $rsc->fetch($uuid, $args); }