$param_value) { // TODO: check existance attribut if (property_exists($this, $param_id)) { $this->$param_id = $param_value; } else { throw new \Exception("You're trying access unknow attribute '$param_id'"); } } } protected function setQuery(Query $query) { $this->query = $query; } public function getQuery(Registry $doctrine, $user_id, $exec_type) { return $this->query; } }