ZF-8469: Zend_Rest_Route::assemble() does not implement the $encode parameter

Description

Zend_Rest_Route::assemble() does not implement the $encode parameter (it is in the method signature but never used). This is sometimes needed when using the index action with parameters. Please encode values when the $encode parameter is set to true. Also consider encoding the id value when $encode is set to true (although this is probably needed less often).

Comments

This patch will encode values (other than id) when the $encode parameter is set to true.

Also, Zend_Rest_Route::match() does not URL decode values. URL parameters should be decoded.

My last comment seems to be not entirely correct. It appears that values do get URL decoded (but I don't see where) however IDs do not get URL decoded. Consider URL decoding ID values.

added urlencode to assemble() param values, and urldecode of id param values to match()