protected function _pathEncode($spec)
    {
        if (is_string($spec)) {
            $spec = explode('/', $spec);
        }

        $keys = array_keys($this->_encode_path);
        $vals = array_values($this->_encode_path);

        $out = array();
        foreach ((array) $spec as $elem) {
            $out[] = str_replace($keys, $vals, $elem);
        }

        return implode('/', $out);
    }
protected function _pathEncode($spec)
    {
        if (is_string($spec)) {
            $spec = explode('/', $spec);
        }

        $keys = array_keys($this->_encode_path);
        $vals = array_values($this->_encode_path);

        $out = array();
        foreach ((array) $spec as $elem) {
            $out[] = str_replace($keys, $vals, $elem);
        }

        return implode('/', $out);
    }
protected function _pathEncode ( $ spec ) { if ( is_string ( $ spec ) ) { $ spec = explode ( '/' , $ spec ) ; } $ keys = array_keys ( $ this -> _encode_path ) ; $ vals = array_values ( $ this -> _encode_path ) ; $ out = array ( ) ; foreach ( ( array ) $ spec as $ elem ) { $ out [ ] = str_replace ( $ keys , $ vals , $ elem ) ; } return implode ( '/' , $ out ) ; }
Converts an array of path elements into a string.

Does not use urlencode(); instead, only converts characters found in AnHttpUrl::$_encode_path.

@param  $spec array The path elements.
@return string A url path string.
Converts an array of path elements into a string .