Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AttachmentsHandler
  • EmailFactory
  • EmailService
  • MailerAdapter

Class EmailFactory

Class EmailFactory

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

Methods summary

public
# __construct( CI_DB_query_builder $db )

Class Constructor

Class Constructor

Parameters

$db
Query builder.
public Email
# createEmail( IdType $id = null, EmailSubjectInterface $subject = null, EmailContentInterface $contentHtml = null, EmailContentInterface $contentPlain = null, boolean $p_isPending = true, ContactCollectionInterface $contacts = null, AttachmentCollectionInterface $attachments = null )

Creates an email object

Creates an email object

Parameters

$id
(optional) E-Mail ID.
$subject
(optional) E-Mail subject.
$contentHtml
$contentPlain (optional) E-Mail plain content.
$contentPlain
$contentHtml (optional) E-Mail HTML content.
$p_isPending
(optional) E-Mail is pending?
$contacts
(optional) E-Mail contacts.
$attachments
(optional) E-Mail attachments.

Returns

Email
The created email.

Throws

InvalidArgumentException
If '$p_isPending' is not a bool, or if any other argument is not valid.
UnexpectedValueException
If the contact type was not found

Implementation of

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

Creates an email contact object

Creates an email contact object

Parameters

$emailAddress
Email address of the contact.
$contactType
Contact type (see ContactType class definition).
$contactName
(optional) Contact display name.

Returns

EmailContact
The created email contact.

Implementation of

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

Creates an email attachment object

Creates an email attachment object

Parameters

$path
Valid path of the attachment (on the server).
$name
(optional) Display name for the attachment.

Returns

EmailAttachment
The created email attachment.

Implementation of

EmailFactoryInterface::createAttachment()
public MailerAdapter
# createMailerAdapter( )

Creates a mailer adapter object

Creates a mailer adapter object

Returns

MailerAdapter
The created mailer adapter.

Implementation of

EmailFactoryInterface::createMailerAdapter()
public PHPMailer
# createMailer( string $protocol = null )

Creates a PHP mailer object.

Creates a PHP mailer object.

Parameters

$protocol

(Optional) Provide 'smtp', 'sendmail' or 'mail' if you want to override the EMAIL_TRANSPORT constant.

Returns

PHPMailer
The created PHP mailer.

Implementation of

EmailFactoryInterface::createMailer()
public EmailService
# createService( )

Creates an email service object

Creates an email service object

Returns

EmailService
The created email service.

Implementation of

EmailFactoryInterface::createService()
public EmailRepository
# createRepository( )

Creates an email repository object

Creates an email repository object

Returns

EmailRepository
The created email repository.

Implementation of

EmailFactoryInterface::createRepository()
public EmailWriter
# createWriter( )

Creates an email writer object

Creates an email writer object

Returns

EmailWriter
The created email writer.

Implementation of

EmailFactoryInterface::createWriter()
public EmailReader
# createReader( )

Create EmailReader Object

Create EmailReader Object

Returns

EmailReader
The created email deleter.

Implementation of

EmailFactoryInterface::createReader()
public EmailDeleter
# createDeleter( )

Creates email deleter object

Creates email deleter object

Returns

EmailDeleter
The created email deleter.

Implementation of

EmailFactoryInterface::createDeleter()
public AttachmentsHandler
# createAttachmentsHandler( string $p_uploadsDirPath = null )

Creates an attachments handler object

Creates an attachments handler object

Parameters

$p_uploadsDirPath

(optional) You can specify a custom uploads directory path if you do not want the default "uploads" directory. The path must contain a "tmp" and an "attachments" directory otherwise the AttachmentsHandler class will not work properly.

Returns

AttachmentsHandler
The created attachments handler.

Implementation of

EmailFactoryInterface::createAttachmentsHandler()
protected CI_DB_query_builder
# _getDbConnection( )

Returns a database connection.

Returns a database connection.

Returns

CI_DB_query_builder
Database connection.

Properties summary

protected CI_DB_query_builder $db

Query builder.

Query builder.

#
API documentation generated by ApiGen