Example #1
0
 /**
  * Apply a configuration array
  *
  * @param  array  $configuration
  */
 public static function setUp(array $configuration)
 {
     self::reset();
     foreach ($configuration as $k => $v) {
         switch ($k) {
             case 'returnSize':
                 static::$returnSize = $v;
                 break;
             case 'reportedSize':
                 static::$reportedSize = $v;
                 break;
             case 'url':
                 static::$url = $v;
                 break;
             case 'errno':
                 static::$errno = $v;
                 break;
             case 'error':
                 static::$error = $v;
                 break;
             case 'httpstatus':
                 static::$httpstatus = $v;
                 break;
         }
     }
 }
Example #2
0
 /**
  * Apply a configuration array
  *
  * @param  array  $configuration
  */
 public static function setUp(array $configuration)
 {
     self::reset();
     foreach ($configuration as $k => $v) {
         switch ($k) {
             case 'returnSize':
                 static::$returnSize = (int) $v;
                 break;
             case 'url':
                 static::$url = $v;
                 break;
             case 'httpstatus':
                 static::$httpstatus = (int) $v;
                 break;
             case 'setHeaders':
                 static::$setHeaders = (bool) $v;
                 break;
         }
     }
 }