public function addUser(AbstractUnitObject $unit) { if ($this->getRootNode()->queryOne(sprintf('phpdox:users/phpdox:%s[@full = "%s"]', $unit->getType(), $unit->getName())) !== NULL) { return; } $user = $this->addToContainer('users', $unit->getType()); $this->setName($unit->getName(), $user); }
public function addImplementor(AbstractUnitObject $unit) { if ($this->getRootNode()->queryOne(sprintf('phpdox:implementor[@full = "%s"]', $unit->getName())) !== NULL) { return; } $implementor = $this->addToContainer('implementors', $unit->getType()); $this->setName($unit->getName(), $implementor); }
public function addImplementor(AbstractUnitObject $unit) { if ($this->getRootNode()->queryOne(sprintf('phpdox:implementor[@full = "%s"]', $unit->getName())) !== NULL) { return; } $implementor = $this->getRootNode()->appendElementNS(self::XMLNS, 'implementor'); $this->setName($unit->getName(), $implementor); }