コード例 #1
0
 /**
  * AbstractParameter constructor.
  *
  * @author Art <*****@*****.**>
  *
  * @param array $args Arguments to set
  */
 protected function __construct(array $args = [])
 {
     $this->args = Util::trimNulls($args);
 }
コード例 #2
0
ファイル: Options.php プロジェクト: alorel/dropbox-v2-php
 /**
  * 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));
 }