private function explodeCleanParamRule($rule)
    {
        // strip multi-spaces
        $rule = preg_replace('/\s+/S', ' ', $rule);
        // split into parameter and path
        $array = explode(' ', $rule, 2);
        $cleanParam = array();
        // strip any invalid characters from path prefix
        $cleanParam['path'] = isset($array[1]) ? $this->encode_url(preg_replace('/[^A-Za-z0-9\.-\/\*\_]/', '', $array[1])) : '/*';
        $param = explode('&', $array[0]);
        foreach ($param as $key) {
            $cleanParam['param'][] = trim($key);
        }
        return $cleanParam;
    }
private function explodeCleanParamRule($rule)
    {
        // strip multi-spaces
        $rule = preg_replace('/\s+/S', ' ', $rule);
        // split into parameter and path
        $array = explode(' ', $rule, 2);
        $cleanParam = array();
        // strip any invalid characters from path prefix
        $cleanParam['path'] = isset($array[1]) ? $this->encode_url(preg_replace('/[^A-Za-z0-9\.-\/\*\_]/', '', $array[1])) : '/*';
        $param = explode('&', $array[0]);
        foreach ($param as $key) {
            $cleanParam['param'][] = trim($key);
        }
        return $cleanParam;
    }
private function explodeCleanParamRule ( $ rule ) { // strip multi-spaces $ rule = preg_replace ( '/\s+/S' , ' ' , $ rule ) ; // split into parameter and path $ array = explode ( ' ' , $ rule , 2 ) ; $ cleanParam = array ( ) ; // strip any invalid characters from path prefix $ cleanParam [ 'path' ] = isset ( $ array [ 1 ] ) ? $ this -> encode_url ( preg_replace ( '/[^A-Za-z0-9\.-\/\*\_]/' , '' , $ array [ 1 ] ) ) : '/*' ; $ param = explode ( '&' , $ array [ 0 ] ) ; foreach ( $ param as $ key ) { $ cleanParam [ 'param' ] [ ] = trim ( $ key ) ; } return $ cleanParam ; }
Explode Clean-Param rule

@param  string $rule
@return array
Explode Clean - Param rule