/** * Constructs a param request * * @param array $values */ public function __construct(array $values = array()) { parent::__construct($values); $this->type = FCGI::GET_VALUES_RESULT; }
/** * Constructs a request * * @param array $keys List of keys to receive */ public function __construct(array $keys = array()) { parent::__construct(array_fill_keys($keys, '')); $this->type = FCGI::GET_VALUES; }
public function testUnpacking() { $request = Params::unpack(hex2bin(preg_replace('/\\s+/', '', self::$rawMessage))); $this->assertEquals($request->getType(), FCGI::PARAMS); $this->assertEquals($request->getValues(), self::$params); }