/** * Hydrate the current object from a $_GET, $_POST, or $_REQUEST array * @return $this */ public static function createFromGlobals() { $request = new static(); $data = new Dictionary($_GET); $data->addAll($_POST); return $request->createFromCollection($data); }
public function testToArray() { $data = ['key1' => 'value1', 'key2' => 'value2', 'key3' => ['key3.1' => 'value3.1']]; $this->coll->addAll($data); $this->assertEquals($data, $this->coll->toArray()); }