Example #1
0
 public function merge(CurlConfig $config)
 {
     $reflect = new \ReflectionClass($this);
     $properties = $reflect->getProperties(\ReflectionProperty::IS_PRIVATE);
     foreach ($properties as $property) {
         $name = ltrim($property->getName(), '_');
         if ($name !== 'proxyInfo' && $name !== 'modifiedOptions') {
             if (!$this->isOptionSet($name) && $config->isOptionSet($name)) {
                 $this->{$name} = $config->{$name};
             }
         }
     }
 }