Beispiel #1
0
 public function __construct($mixed = [])
 {
     if (is_string($mixed)) {
         $mixed = ['url' => $mixed];
     }
     parent::__construct($mixed);
     $this->options()->setUnlessExists('verb', 'GET')->setUnlessExists('headers', null)->setUnlessExists('timeout', self::DEFAULT_TIMEOUT)->setUnlessExists('fields', null)->force('url');
 }
Beispiel #2
0
 public function __construct($mixed)
 {
     if (is_string($mixed)) {
         $mixed = ['path' => $mixed];
     }
     if (!is_array($mixed)) {
         throw new OptionException('invalid constructor parameter');
     }
     parent::__construct($mixed);
     $this->options()->force('path');
 }
Beispiel #3
0
 public function scent()
 {
     return $this->inner()->scent() . "\n" . parent::scent();
 }