Пример #1
0
 /**
  * Send the response to the device
  */
 public function send($content = null, $type = null)
 {
     if (!is_null($content)) {
         $this->setContents(is_array($content) ? $content : array($content));
     }
     if (!is_null($type)) {
         $this->setContentType($type);
     }
     return parent::send();
 }
Пример #2
0
 /**
  * @param null|string $content
  * @param null|string $type
  * @return void
  */
 public function send($content = null, $type = null)
 {
     if (!empty($content)) {
         self::addContent(null, $content);
     }
     if (!empty($type)) {
         parent::setContentType($type);
     }
     parent::send();
 }