protected function getExtension() { if (!$this->extension) { # # If its not there, then create extension structure # $this->extension = $this->createElement('extension'); $this->getCommand()->appendChild($this->extension); } return $this->extension; }