Example #1
0
 /**
  * Sends a content string to the client.
  *
  * If the content is a callable, it is invoked. The callable should either
  * return a string or output content directly and have no return value.
  *
  * @param array|string $content String to send as response body or callable
  *  which returns/outputs content.
  * @return void
  */
 protected function _sendContent($content)
 {
     if (is_array($content)) {
         $content = json_encode($content, JSON_PRETTY_PRINT);
     }
     parent::_sendContent($content);
 }