Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use \Doctrine\ORM\NoResultException;
- class EmailValidator extends AgaviValidator
- {
- protected function validate()
- {
- $aEmail = $this->getData($this->getArgument());
- try {
- $oEmail = $this->getContext()->getModel('Manager', 'Contact')->findEmail($aEmail['address']);
- } catch(NoResultException $oEx) {
- $oEmail = new \Entities\Email($aEmail);
- }
- $this->export($oEmail);
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment