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

  • EmailDeleter
  • EmailReader
  • EmailRepository
  • EmailWriter

Class EmailRepository

Class EmailRepository

Handles the database operations that concern the email records of the database. It provides a layer for more complicated methods that use the writer, reader and deleter.

EmailRepository implements EmailRepositoryInterface
Package: Email\Repository
Category: System
Located at SystemServices/Email/Repositories/EmailRepository.inc.php

Methods summary

public
# __construct( EmailWriterInterface $writer, EmailReaderInterface $reader, EmailDeleterInterface $deleter )

Class Constructor

Class Constructor

Parameters

$writer
Used for database writing operations.
$reader
Used for database reading operations.
$deleter
Used for database deleting operations.
public
# write( EmailInterface $email )

Writes an email record into the database.

Writes an email record into the database.

Parameters

$email
Contains the email information.

Implementation of

EmailRepositoryInterface::write()
public EmailInterface
# getById( IdType $id )

Returns an email record by ID.

Returns an email record by ID.

Parameters

$id
Database ID of the record to be returned.

Returns

EmailInterface
Returns the email object that matches the ID.

Throws

UnexpectedValueException
If record does not exist.

Implementation of

EmailRepositoryInterface::getById()
public EmailInterface|null
# findById( IdType $id )

Find email by ID

Find email by ID

This method will try to find the email record that matches provided ID and will return NULL on when the record does not exist.

Parameters

$id
Email record id to be found.

Returns

EmailInterface|null
Returns email object or null on failure.

Implementation of

EmailRepositoryInterface::findById()
public EmailCollection
# getPending( )

Returns a collection of pending emails.

Returns a collection of pending emails.

Returns

EmailCollection
Returns the pending email objects.

Implementation of

EmailRepositoryInterface::getPending()
public EmailCollection
# getSent( )

Returns a collection of sent emails.

Returns a collection of sent emails.

Returns

EmailCollection
Returns the sent email objects.

Implementation of

EmailRepositoryInterface::getSent()
public EmailCollection
# getAll( )

Returns all email records from the database.

Returns all email records from the database.

Returns

EmailCollection
Returns all email objects.

Implementation of

EmailRepositoryInterface::getAll()
public
# delete( EmailInterface $email )

Removes all information of an email record from the database.

Removes all information of an email record from the database.

This method will remove ALL the email information, from the tables that contain information about the specified email.

Parameters

$email
Contains the email information.

Implementation of

EmailRepositoryInterface::delete()
public EmailCollection
# filter( string $p_keyword, array $limit = array(), array $order = array() )

Filter email records with provided keyword string.

Filter email records with provided keyword string.

Parameters

$p_keyword
String to be used for filtering the email records.
$limit

(optional) Array that contains LIMIT and OFFSET value e.g. array( 'limit' => 10, 'offset' => 5 )

$order

(optional) Contains arrays with column, direction pairs e.g. array( 'column' => 'direction' )

Returns

EmailCollection
Returns a collection containing the email records.

Implementation of

EmailRepositoryInterface::filter()
public integer
# getRecordCount( string $p_filterKeyword = '' )

Get the current count of the email records in the database.

Get the current count of the email records in the database.

Parameters

$p_filterKeyword
(optional) If provided the records will be filtered.

Returns

integer
Returns the row number of the email table.

Implementation of

EmailRepositoryInterface::getRecordCount()

Properties summary

protected EmailWriterInterface $writer

E-Mail writer.

E-Mail writer.

#
protected EmailReaderInterface $reader

E-Mail reader.

E-Mail reader.

#
protected EmailDeleterInterface $deleter

E-Mail deleter.

E-Mail deleter.

#
API documentation generated by ApiGen