Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 protected function postProcessStructuredResponse(&$structuredResponse, $data)
 {
     parent::postProcessStructuredResponse($structuredResponse, $data);
     if (null === $this->message) {
         unset($structuredResponse['message']);
     }
 }
Ejemplo n.º 2
0
 /**
  * @inheritdoc
  */
 protected function postProcessStructuredResponse(&$structuredResponse, $data)
 {
     parent::postProcessStructuredResponse($structuredResponse, $data);
     if (empty($data) || $data instanceof \ArrayObject && count($data) === 0) {
         unset($structuredResponse['data']);
     }
 }