Back to RouterView class

Method parse

public array
parse
(mixed &$segments)
Parse method for URLs
Parameters
  • array & $segments Array of URL string-segments
Returns
  • array Associative array of query values
Since
  • 3.5
Class: RouterView
Project: Joomla

Method parse - Source code

/**
 * Parse method for URLs
 *
 * @param   array  &$segments  Array of URL string-segments
 *
 * @return  array  Associative array of query values
 *
 * @since   3.5
 */
public function parse(&$segments)
{
    $vars = array();
    // Process the parsed variables based on custom defined rules
    foreach ($this->rules as $rule) {
        $rule->parse($segments, $vars);
    }
    return $vars;
}