/** * @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)); } }
/** * {@inheritDoc} */ public function getMode() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getMode', array()); return parent::getMode(); }