| @@ 56-63 (lines=8) @@ | ||
| 53 | * |
|
| 54 | * @param string $templateVar |
|
| 55 | */ |
|
| 56 | public function setTemplateVar($templateVar) |
|
| 57 | { |
|
| 58 | if (1 === func_num_args() || func_get_arg(1)) { |
|
| 59 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 60 | } |
|
| 61 | ||
| 62 | $this->templateVar = $templateVar; |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Returns the template var name to be used for templating formats. |
|
| @@ 72-79 (lines=8) @@ | ||
| 69 | * |
|
| 70 | * @return string |
|
| 71 | */ |
|
| 72 | public function getTemplateVar() |
|
| 73 | { |
|
| 74 | if (0 === func_num_args() || func_get_arg(0)) { |
|
| 75 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 76 | } |
|
| 77 | ||
| 78 | return $this->templateVar; |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * @param int $statusCode |
|
| @@ 118-125 (lines=8) @@ | ||
| 115 | * |
|
| 116 | * @param bool $populateDefaultVars |
|
| 117 | */ |
|
| 118 | public function setPopulateDefaultVars($populateDefaultVars) |
|
| 119 | { |
|
| 120 | if (1 === func_num_args() || func_get_arg(1)) { |
|
| 121 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 122 | } |
|
| 123 | ||
| 124 | $this->populateDefaultVars = (bool) $populateDefaultVars; |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * @deprecated since 2.8 |
|
| @@ 132-139 (lines=8) @@ | ||
| 129 | * |
|
| 130 | * @return bool |
|
| 131 | */ |
|
| 132 | public function isPopulateDefaultVars() |
|
| 133 | { |
|
| 134 | if (0 === func_num_args() || func_get_arg(0)) { |
|
| 135 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 136 | } |
|
| 137 | ||
| 138 | return $this->populateDefaultVars; |
|
| 139 | } |
|
| 140 | ||
| 141 | /** |
|
| 142 | * @param bool $serializerEnableMaxDepthChecks |
|
| @@ 183-192 (lines=10) @@ | ||
| 180 | * |
|
| 181 | * @return View |
|
| 182 | */ |
|
| 183 | public function setTemplateData($data = []) |
|
| 184 | { |
|
| 185 | if (1 === func_num_args() || func_get_arg(1)) { |
|
| 186 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 187 | } |
|
| 188 | ||
| 189 | $this->templateData = $data; |
|
| 190 | ||
| 191 | return $this; |
|
| 192 | } |
|
| 193 | ||
| 194 | /** |
|
| 195 | * Sets a header. |
|
| @@ 287-296 (lines=10) @@ | ||
| 284 | * |
|
| 285 | * @return View |
|
| 286 | */ |
|
| 287 | public function setTemplateVar($templateVar) |
|
| 288 | { |
|
| 289 | if (1 === func_num_args() || func_get_arg(1)) { |
|
| 290 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 291 | } |
|
| 292 | ||
| 293 | $this->templateVar = $templateVar; |
|
| 294 | ||
| 295 | return $this; |
|
| 296 | } |
|
| 297 | ||
| 298 | /** |
|
| 299 | * Sets the engine. |
|
| @@ 405-412 (lines=8) @@ | ||
| 402 | * |
|
| 403 | * @return mixed|null |
|
| 404 | */ |
|
| 405 | public function getTemplateData() |
|
| 406 | { |
|
| 407 | if (0 === func_num_args() || func_get_arg(0)) { |
|
| 408 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 409 | } |
|
| 410 | ||
| 411 | return $this->templateData; |
|
| 412 | } |
|
| 413 | ||
| 414 | /** |
|
| 415 | * Gets the HTTP status code. |
|
| @@ 441-448 (lines=8) @@ | ||
| 438 | * |
|
| 439 | * @return TemplateReferenceInterface|string|null |
|
| 440 | */ |
|
| 441 | public function getTemplate() |
|
| 442 | { |
|
| 443 | if (0 === func_num_args() || func_get_arg(0)) { |
|
| 444 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 445 | } |
|
| 446 | ||
| 447 | return $this->template; |
|
| 448 | } |
|
| 449 | ||
| 450 | /** |
|
| 451 | * Gets the template variable name. |
|
| @@ 457-464 (lines=8) @@ | ||
| 454 | * |
|
| 455 | * @return string|null |
|
| 456 | */ |
|
| 457 | public function getTemplateVar() |
|
| 458 | { |
|
| 459 | if (0 === func_num_args() || func_get_arg(0)) { |
|
| 460 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 461 | } |
|
| 462 | ||
| 463 | return $this->templateVar; |
|
| 464 | } |
|
| 465 | ||
| 466 | /** |
|
| 467 | * Gets the engine. |
|
| @@ 272-279 (lines=8) @@ | ||
| 269 | * |
|
| 270 | * @return bool |
|
| 271 | */ |
|
| 272 | public function isFormatTemplating($format) |
|
| 273 | { |
|
| 274 | if (1 === func_num_args() || func_get_arg(1)) { |
|
| 275 | @trigger_error(sprintf('The %s() method is deprecated since FOSRestBundle 2.8.', __METHOD__), E_USER_DEPRECATED); |
|
| 276 | } |
|
| 277 | ||
| 278 | return !empty($this->formats[$format]); |
|
| 279 | } |
|
| 280 | ||
| 281 | /** |
|
| 282 | * Gets or creates a JMS\Serializer\SerializationContext and initializes it with |
|