Ejemplo n.º 1
0
 /**
  * @param string $body
  * @param int    $status
  * @param array  $headers
  */
 public function __construct($body = '', $status = 200, array $headers = [])
 {
     $this->status = $status;
     $this->body = $body;
     $this->headers = new Store(['Content-Type' => 'text/html']);
     $this->headers->setData($headers);
 }
Ejemplo n.º 2
0
 /**
  * @param array $attributes
  */
 public function add(array $attributes)
 {
     if (ArrayHelper::isAssoc($attributes)) {
         $this->attributes->setData($attributes);
     } else {
         foreach ($attributes as $attribute) {
             if (is_array($attribute)) {
                 $this->attributes->setData($attribute);
             } else {
                 $this->attributes->set($attribute, $attribute);
             }
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * Data with the same key will be overridden
  *
  * @param array $data
  */
 public function addData(array $data)
 {
     $this->data->setData($data);
 }
Ejemplo n.º 4
-1
 /**
  * @return Store
  */
 public function getConfig()
 {
     $store = new Store(require ROOT . '/config/public.php');
     $store->setData(require ROOT . '/config/private.php');
     return $store;
 }