Пример #1
0
 /**
  * AbstractParameter constructor.
  *
  * @author Art <*****@*****.**>
  *
  * @param array $args Arguments to set
  */
 protected function __construct(array $args = [])
 {
     $this->args = Util::trimNulls($args);
 }
Пример #2
0
 /**
  * Create an Options object from a combination of configuration arrays and other option objects
  *
  * @author Art <*****@*****.**>
  *
  * @param array ...$options The items to merge
  *
  * @return Options
  */
 public static function merge(...$options)
 {
     $o = [];
     foreach ($options as $opt) {
         if ($opt instanceof Options) {
             $o = array_merge($o, $opt->toArray());
         } elseif (is_array($opt)) {
             $o = array_merge($o, $opt);
         }
     }
     return new self(Util::trimNulls($o));
 }