Changeset 2814:9817c7cce256 for inc
- Timestamp:
- 11/25/14 12:46:28 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.adminurl.php
r2783 r2814 11 11 # -- END LICENSE BLOCK ----------------------------------------- 12 12 if (!defined('DC_RC_PATH')) { return; } 13 14 13 15 14 /** … … 42 41 * @param array $params query string params (optional) 43 42 */ 44 public function register ($name,$url,$params =array())43 public function register($name,$url,$params=array()) 45 44 { 46 45 $this->urls[$name] = array('url' => $url, 'qs' => $params); … … 54 53 * @param string $newurl new url if different from the original 55 54 */ 56 public function registercopy ($name,$orig,$params =array(),$newurl='')55 public function registercopy($name,$orig,$params=array(),$newurl='') 57 56 { 58 57 if (!isset($this->urls[$orig])) { … … 65 64 } 66 65 $this->urls[$name] = $url; 67 68 66 } 69 67 … … 76 74 * @return string the forged url 77 75 */ 78 public function get 76 public function get($name,$params=array(),$separator='&') 79 77 { 80 78 if (!isset($this->urls[$name])) { … … 91 89 92 90 /** 91 * retrieves a URL (decoded — useful for echoing) given its name, and optional parameters 92 * 93 * @param string $name URL Name 94 * @param array $params query string parameters, given as an associative array 95 * @param string $separator separator to use between QS parameters 96 * @return string the forged decoded url 97 */ 98 public function decode($name,$params=array(),$separator='&') 99 { 100 return urldecode($this->get($name,$params,$separator)); 101 } 102 103 /** 93 104 * Returns $urls property content. 94 105 * 95 106 * @return ArrayObject 96 107 */ 97 public function dumpUrls() { 108 public function dumpUrls() 109 { 98 110 return $this->urls; 99 111 } 100 112 } 101
Note: See TracChangeset
for help on using the changeset viewer.