コード例 #1
0
ファイル: Repository.php プロジェクト: narrowspark/framework
 /**
  * Set an array of configuration options
  * Merge provided values with the defaults to ensure all required values are set.
  *
  * @param array $values
  *
  * @return $this
  */
 public function setArray(array $values = []) : RepositoryContract
 {
     $this->data = Arr::merge($this->data, $values);
     return $this;
 }
コード例 #2
0
ファイル: Route.php プロジェクト: narrowspark/framework
 /**
  * {@inheritdoc}
  */
 public function gatherMiddleware() : array
 {
     // Merge middlewares from Action.
     $with = Arr::get($this->action, 'middleware.with', []);
     $without = Arr::get($this->action, 'middleware.without', []);
     $this->middlewares = Arr::merge($this->middlewares, $this->getControllerMiddleware());
     $this->middlewares['with'] = array_merge($this->middlewares['with'], is_array($with) ? $with : [$with]);
     $this->middlewares['without'] = array_merge($this->middlewares['without'], is_array($without) ? $without : [$without]);
     return $this->middlewares;
 }