I noticed that templated links are still not supported in ZF-Hal. We are already using templated links for a long time inside our customized version of this library, what is the reason that templated links are not yet supported?
Is it because of issues with rendering the curly brackets or braces so { and } ?
If that is the case, we simply solved this issue by adding a decodeCurlyBrackets to the LinkExtractor class:
if($object->isTemplated()){
self::decodeCurlyBrackets($representation['href']);
}
And inside the decoder method:
/**
* We need to decode curly brackets that are used for link templating.
* They are encoded automatically by the url view helper.
*
* @param $string
* @return string
*/
private static function decodeCurlyBrackets(&$string)
{
$string = str_replace('%7B', '{' , $string);
$string = str_replace('%7D', '}' , $string);
return $string;
}
Could we add such a feature which is an essential part of the Hal standard?
I noticed that templated links are still not supported in ZF-Hal. We are already using templated links for a long time inside our customized version of this library, what is the reason that templated links are not yet supported?
Is it because of issues with rendering the curly brackets or braces so { and } ?
If that is the case, we simply solved this issue by adding a
decodeCurlyBracketsto theLinkExtractorclass:And inside the decoder method:
Could we add such a feature which is an essential part of the Hal standard?