Highway to PSR2
[openemr.git] / portal / patient / fwk / libs / verysimple / HTTP / UrlWriter.php
blob05095d0a613d781fb9f465e56358511d9ad10183
1 <?php
2 /** @package verysimple::HTTP */
3 require_once("verysimple/Phreeze/ActionRouter.php");
4 require_once("verysimple/HTTP/RequestUtil.php");
6 /**
7 * class for dealing with URLs
9 * @package verysimple::HTTP
10 * @author VerySimple Inc.
11 * @copyright 1997-2007 VerySimple, Inc. http://www.verysimple.com
12 * @license http://www.gnu.org/licenses/lgpl.html LGPL
13 * @version 1.0
15 class UrlWriter extends ActionRouter
17 /**
18 * Returns a url for the given controller, method and parameters
20 * @param string $controller
21 * @param string $method
22 * @param string $params
23 * in the format param1=val1&param2=val2
24 * @param bool $strip_api
25 * set to true to strip virtual part of the url in a rest call
26 * @param string $delim
27 * the querystring variable delimiter (& or &amp; for generating valid html)
28 * @return string URL
30 public function Get($controller, $method, $params = "", $strip_api = true, $delim = "&")
32 $this->stripApi = $strip_api;
33 $this->delim = $delim;
34 return $this->GetUrl($controller, $method, $params);