Example #1
0
 public function __construct($content = '', $status = 200, $headers = [])
 {
     $this->original = $content;
     parent::__construct($content, $status, $headers);
     $this->header('Content-Type', 'application/json');
     $this->content->update();
 }
Example #2
0
 public function __construct($data = null, $status = 200, array $headers = [])
 {
     parent::__construct('', $status, $headers);
     $this->headers->set('Content-Type', 'application/vnd.api+json');
     $this->content = new Document();
     $this->content->setData($data);
 }
 public function __construct($filePath)
 {
     parent::__construct();
     if (!File::isFile($filePath)) {
         throw new Exception("Cannot read file: {$filePath}");
     }
     $fileContent = file_get_contents($filePath);
     $this->setContent($fileContent);
     $lastModified = new DateTime();
     $lastModified->setTimestamp(File::lastModified($filePath));
     $this->setLastModified($lastModified);
     $this->isNotModified(App::make('request'));
 }
Example #4
0
 public function __construct($data, $status)
 {
     $this->json = $data;
     parent::__construct('', $status);
 }
Example #5
0
 /**
  * Create a new response instance.
  *
  * @param mixed                          $content
  * @param int                            $status
  * @param array                          $headers
  * @param \Dingo\Api\Transformer\Binding $binding
  *
  * @return void
  */
 public function __construct($content, $status = 200, $headers = [], Binding $binding = null)
 {
     parent::__construct($content, $status, $headers);
     $this->binding = $binding;
 }
 public function __construct($invoice)
 {
     parent::__construct("INVOICE={$invoice}:STATUS=ERR\n");
 }
Example #7
0
 public function __construct($content = '', $status = 200, $headers = array())
 {
     parent::__construct($content, $status, $headers);
     $this->_contents = array('href' => $this->_getRequestUri(), 'time' => time(), 'statusCode' => $status, 'responseId' => md5(time()), 'ip' => $this->_getIP(), 'app' => \Config::get('app.name', 'none'), 'error' => NULL);
 }
Example #8
0
 public function __construct($content, $status, array $headers = [])
 {
     parent::__construct($content, $status, $headers);
 }
 /**
  * @param string $content
  * @param int    $status
  * @param array  $headers
  */
 public function __construct($content = '', $status = 200, $headers = [])
 {
     parent::__construct($content, $status, $headers);
     $this->prepareResponse();
 }
 public function __construct()
 {
     parent::__construct('ERR=Not valid CHECKSUM\\n');
 }