protected function RestfulFormatterHalJson::withCurie in RESTful 7
Prefix a property name with the curie, if present.
Parameters
string $property_name: The input string.
Return value
string The property name prefixed with the curie.
3 calls to RestfulFormatterHalJson::withCurie()
- RestfulFormatterHalJson::addHateoas in plugins/
formatter/ hal_json/ RestfulFormatterHalJson.class.php - Add HATEOAS links to list of item.
- RestfulFormatterHalJson::moveReferencesToEmbeds in plugins/
formatter/ hal_json/ RestfulFormatterHalJson.class.php - Move the fields referencing other resources to the _embed key.
- RestfulFormatterHalJson::prepare in plugins/
formatter/ hal_json/ RestfulFormatterHalJson.class.php - Massages the raw data to create a structured array to pass to the renderer.
File
- plugins/
formatter/ hal_json/ RestfulFormatterHalJson.class.php, line 216 - Contains RestfulFormatterHalJson.
Class
- RestfulFormatterHalJson
- @file Contains RestfulFormatterHalJson.
Code
protected function withCurie($property_name) {
if ($curie = $this
->getCurie()) {
return $property_name ? $curie['name'] . ':' . $property_name : $curie['name'];
}
return $property_name;
}