public function getId() { if (null === $this->id) { $this->id = XML::generateId(); } return $this->id; }