Skip to content

Instantly share code, notes, and snippets.

@wesleywillians
Created November 15, 2012 20:43
Show Gist options
  • Save wesleywillians/4081122 to your computer and use it in GitHub Desktop.
Save wesleywillians/4081122 to your computer and use it in GitHub Desktop.
public function getServiceConfig()
{
return array(
'factories' => array(
'SONUser\Mail\Transport' => function($sm) {
$config = $sm->get('Config');
$transport = new SmtpTransport();
$options = new SmtpOptions($config['mail']);
$transport->setOptions($options);
return $transport;
},
'SONUser\Service\User' => function($service) {
return new Service\User($service->get('Doctrine\ORM\EntityManager'),$service->get('SONUser\Mail\Transport'));
},
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment