protected function getComponent() { if ($this->componentClass === null) { return null; } if ($this->componentObj !== null) { return $this->componentObj; } $componentClass = $this->componentClass; return $this->componentObj = new $componentClass(); }