getRequest(); foreach ($request->query->getIterator() as $property => $value) { if (property_exists($this, $property)) { $this->{$property} = $value; } } } }