예제 #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;
 }
예제 #2
0
파일: Element.php 프로젝트: ehamrin/1dv608
 public function IsSame(IElement $element)
 {
     return $this->name == $element->GetName();
 }