/** * Return the cleansed attributes */ protected function _normalizeAttributes() { $normalizer = new EngineBlock_Attributes_Normalizer($this->attributes); $normalizedAttributes = $normalizer->normalize(); unset($normalizedAttributes['nameid']); return $normalizedAttributes; }
protected function _sendAttributeSupportMail() { $normalizer = new EngineBlock_Attributes_Normalizer($this->attributes); $normalizedAttributes = $normalizer->normalize(); $email = EngineBlock_ApplicationSingleton::getInstance()->getConfigurationValue('email')->help; $nameId = $normalizedAttributes['nameid'][0]; $view = $this->_getView(); $view->setData(array('metadata' => EngineBlock_ApplicationSingleton::getInstance()->getDiContainer()->getAttributeMetadata(), 'userAttributes' => $normalizedAttributes, 'lang' => $view->language())); $body = $view->render(ENGINEBLOCK_FOLDER_MODULES . '/Profile/View/AttributeSupport/ProfileMail.phtml', false); $mailer = new Zend_Mail('UTF-8'); $mailer->setFrom($email); $mailer->addTo($email); $mailer->setSubject(sprintf("Personal debug info of %s", $nameId)); $mailer->setBodyHtml($body); $mailer->send(); }
public function execute() { $normalizer = new EngineBlock_Attributes_Normalizer($this->_responseAttributes); $this->_responseAttributes = $normalizer->normalize(); }
protected function _normalize(array $input, array $definition) { $this->_messageRecorder = new EngineBlock_Test_Attributes_MessageRecorder(); $normalizer = new EngineBlock_Attributes_Normalizer($input); $normalizer->setLogger($this->_messageRecorder); $normalizer->setDefinition($definition); return $normalizer->normalize(); }