Class EmailFactory

Class EmailFactory

EmailFactory implements EmailFactoryInterface
Package: Email
Category: System
Located at Services/System/Email/EmailFactory.inc.php

Methods summary

public __construct( CI_DB_query_builder $db )

Class Constructor

public createEmail( IdType $id = null, EmailSubjectInterface $subject = null, EmailContentInterface $contentHtml = null, EmailContentInterface $contentPlain = null, boolean $p_isPending = true, ContactCollectionInterface $contacts = null, AttachmentCollectionInterface $attachments = null ) : Email

Creates an email object

public createContact( EmailAddressInterface $emailAddress, ContactTypeInterface $contactType, ContactNameInterface $contactName = null ) : EmailContact

Creates an email contact object

public createAttachment( AttachmentPathInterface $path, AttachmentNameInterface $name = null ) : EmailAttachment

Creates an email attachment object

public createMailerAdapter( void ) : MailerAdapter

Creates a mailer adapter object

public createPunycodeEncoder( void ) : TrueBV\Punycode

Creates a PHP Punycode encoder instance.

public createMailer( string $protocol = null, EmailMailerSettings $mailerSettings = null ) : PHPMailer

Creates a PHP mailer object.

protected _buildMailerSettings( void ) : boolean|EmailMailerSettings

Builds and returns the mailer settings.

public createService( void ) : EmailService

Creates an email service object

public createRepository( void ) : EmailRepository

Creates an email repository object

public createWriter( void ) : EmailWriter

Creates an email writer object

public createReader( void ) : EmailReader

Create EmailReader Object

public createDeleter( void ) : EmailDeleter

Creates email deleter object

public createAttachmentsHandler( string $p_uploadsDirPath = null ) : AttachmentsHandler

Creates an attachments handler object

protected _getDbConnection( void ) : CI_DB_query_builder

Returns a database connection.

protected _string( $string ) : StringType

Returns a new string type.

Properties summary

protected $db : CI_DB_query_builder

Query builder.