Dotclear


Ignore:
Timestamp:
11/15/14 10:44:04 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add a function to retrieve the full list of registered urls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.adminurl.php

    r2708 r2783  
    4242      * @param  array  $params query string params (optional) 
    4343      */ 
    44      public function register ($name,$url,$params = array()) { 
     44     public function register ($name,$url,$params = array()) 
     45     { 
    4546          $this->urls[$name] = array('url' => $url, 'qs' => $params); 
    4647     } 
     
    5354      * @param  string $newurl new url if different from the original 
    5455      */ 
    55      public function registercopy ($name,$orig,$params = array(),$newurl='') { 
     56     public function registercopy ($name,$orig,$params = array(),$newurl='') 
     57     { 
    5658          if (!isset($this->urls[$orig])) { 
    5759               throw new exception ('Unknown URL handler for '.$orig); 
     
    7476      * @return string            the forged url 
    7577      */ 
    76      public function get ($name,$params=array(),$separator='&amp;') { 
     78     public function get ($name,$params=array(),$separator='&amp;') 
     79     { 
    7780          if (!isset($this->urls[$name])) { 
    7881               throw new exception ('Unknown URL handler for '.$name); 
     
    8790     } 
    8891 
     92     /** 
     93      * Returns $urls property content. 
     94      * 
     95      * @return  ArrayObject 
     96      */ 
     97     public function dumpUrls() { 
     98          return $this->urls; 
     99     } 
    89100} 
    90101 
Note: See TracChangeset for help on using the changeset viewer.

Sites map