private function addProperty(AbstractProperty $p) { if (!$p->hasName() || $p->isEmpty()) { throw new IllegalArgumentException("The Property to add has no name of is empty"); } if (array_key_exists($p->name(), $this->set)) { throw new IllegalArgumentException("A Property with the same name \"{$p->name()}\" already exists in the property \"{$this->name()}\""); } if ($this->set == null) { $this->set = array(); } $this->set[$p->name()] = $p; }