Ejemplo n.º 1
0
 public function Add(IElement $toBeAdded)
 {
     foreach ($this->GetAll() as $input) {
         if ($toBeAdded->IsSame($input)) {
             throw new ElementExistsException("Input with name " . $toBeAdded->GetName() . " already exist!");
         }
     }
     $this->input[$toBeAdded->GetName()] = $toBeAdded;
 }
Ejemplo n.º 2
0
 public function IsSame(IElement $element)
 {
     return $this->name == $element->GetName();
 }