function controller_location($args, $output = "inline") { if (!empty($args["id"])) { list($provider, $id) = explode(":", $args["id"], 2); switch ($provider) { case 'yelp': $yelp = new Yelp(); $vars["location"] = $yelp->getLocationInfo($id); } } return $this->GetTemplate("./location.tpl", $vars); }