public function setMethod($methodName, ClassMethod $method) { $this->methods[$methodName] = $method; }