Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function add(EnumInterface $enum)
 {
     if ($this->has($enum->getName())) {
         throw new DuplicatedEnumException($enum->getName());
     }
     $this->enums[$enum->getName()] = $enum;
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function add(EnumInterface $enum)
 {
     if ($this->has($enum->getName())) {
         throw DuplicatedEnumException::alreadyRegistered($enum->getName());
     }
     $this->enums[$enum->getName()] = $enum;
 }