Пример #1
0
 /**
  * @param  \Orm\Entity\OptIn $optin
  *
  * @throws \Cms\Service\Optin\InvalidModeException
  */
 private function isValidMode(\Orm\Entity\OptIn $optin)
 {
     $mode = $optin->getMode();
     if (!in_array($mode, array(\Orm\Entity\OptIn::MODE_REGISTER, \Orm\Entity\OptIn::MODE_PASSWORD))) {
         throw new InvalidModeException(1038, __METHOD__, __LINE__, array('mode' => $mode));
     }
 }
Пример #2
0
 /**
  * {@inheritDoc}
  */
 public function getMode()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMode', array());
     return parent::getMode();
 }