Router::prefixes PHP Method

prefixes() public static method

Returns the list of prefixes used in connected routes
public static prefixes ( ) : array
return array A list of prefixes used in connected routes
    public static function prefixes()
    {
        return static::$_prefixes;
    }

Usage Example

 function render($url = null)
 {
     if ($url === null) {
         $prefixes = array_flip(Router::prefixes());
         array_walk($prefixes, create_function('&$item', '$item = false;'));
         $url = array('plugin' => 'kcaptcha', 'controller' => 'captcha', 'action' => 'render_captcha') + $prefixes;
     }
     return sprintf('<img src="%s" />', $this->url($url));
 }
All Usage Examples Of Router::prefixes