Skip to content

Instantly share code, notes, and snippets.

@FabianWesner
Created March 17, 2017 16:30
Show Gist options
  • Select an option

  • Save FabianWesner/2216565a8a982913c5c3d174633fc3a1 to your computer and use it in GitHub Desktop.

Select an option

Save FabianWesner/2216565a8a982913c5c3d174633fc3a1 to your computer and use it in GitHub Desktop.
<?php
namespace Spryker\Zed\Mail\Business;
class MailBusinessFactory extends AbstractBusinessFactory
{
/**
* @return \Spryker\Zed\Mail\Business\Model\Mailer\MailHandlerInterface
*/
public function createMailHandler()
{
return new MailHandler(
$this->createMailBuilder(),
$this->getMailTypeCollection(),
$this->getMailProviderCollection()
);
}
/**
* @return \Spryker\Zed\Mail\Business\Model\Mail\Builder\MailBuilder
*/
protected function createMailBuilder()
{
return new MailBuilder(
$this->getGlossaryFacade()
);
}
/**
* @return \Spryker\Zed\Mail\Dependency\Facade\MailToGlossaryInterface
*/
protected function getGlossaryFacade()
{
return $this->getProvidedDependency(MailDependencyProvider::FACADE_GLOSSARY);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment