protected function getVariables($matches)
    {
        $variables = array();
        
        if (!is_array($matches)) {
            return $variables;
        }
        
        array_shift($matches);
        
        foreach ($matches as $path) {
            $variables = array_merge($variables, explode('/', $path));
        }
        
        foreach ($variables as $i => $variable) {
            if (!$variable) {
                unset($variables[$i]);
            }
        }
        
        return array_values($variables);
    }
protected function getVariables($matches)
    {
        $variables = array();
        
        if (!is_array($matches)) {
            return $variables;
        }
        
        array_shift($matches);
        
        foreach ($matches as $path) {
            $variables = array_merge($variables, explode('/', $path));
        }
        
        foreach ($variables as $i => $variable) {
            if (!$variable) {
                unset($variables[$i]);
            }
        }
        
        return array_values($variables);
    }
protected function getVariables ( $ matches ) { $ variables = array ( ) ; if ( ! is_array ( $ matches ) ) { return $ variables ; } array_shift ( $ matches ) ; foreach ( $ matches as $ path ) { $ variables = array_merge ( $ variables , explode ( '/' , $ path ) ) ; } foreach ( $ variables as $ i => $ variable ) { if ( ! $ variable ) { unset ( $ variables [ $ i ] ) ; } } return array_values ( $ variables ) ; }
Returns a dynamic list of variables
based on the given pattern and path

@param array $matches Matches usually from a preg method

@return array
Returns a dynamic list of variables based on the given pattern and path