mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Added boilerplate code for the new notifications library.
This commit is contained in:
parent
03b4adc6ad
commit
46d1f745ee
1 changed files with 89 additions and 0 deletions
89
application/libraries/Notifications.php
Normal file
89
application/libraries/Notifications.php
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Notifications
|
||||||
|
*
|
||||||
|
* This library handles all the notification email deliveries on the system.
|
||||||
|
*
|
||||||
|
* The email configuration settings are located at: /application/config/email.php
|
||||||
|
*/
|
||||||
|
class Notifications {
|
||||||
|
/**
|
||||||
|
* @var CI_Controller
|
||||||
|
*/
|
||||||
|
private $framework;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifications constructor.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->framework = &get_instance();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send an email notification for an appointment confirmation.
|
||||||
|
*
|
||||||
|
* @param array $appointment
|
||||||
|
* @param array $service
|
||||||
|
* @param array $provider
|
||||||
|
* @param array $customer
|
||||||
|
* @param array $settings
|
||||||
|
* @param string $subject
|
||||||
|
* @param string $message
|
||||||
|
* @param string $link
|
||||||
|
* @param string $recipient
|
||||||
|
* @param string $ics
|
||||||
|
*/
|
||||||
|
public function send_appointment_confirmation(
|
||||||
|
$appointment,
|
||||||
|
$service,
|
||||||
|
$provider,
|
||||||
|
$customer,
|
||||||
|
$settings,
|
||||||
|
$subject,
|
||||||
|
$message,
|
||||||
|
$link,
|
||||||
|
$recipient,
|
||||||
|
$ics
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// TODO: Port logic from engine/Notifications/Email.php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send an email notification for an appointment removal.
|
||||||
|
*
|
||||||
|
* @param array $appointment
|
||||||
|
* @param array $service
|
||||||
|
* @param array $provider
|
||||||
|
* @param array $customer
|
||||||
|
* @param array $settings
|
||||||
|
* @param string $recipient
|
||||||
|
* @param string $reason
|
||||||
|
*/
|
||||||
|
public function send_appointment_removal(
|
||||||
|
$appointment,
|
||||||
|
$service,
|
||||||
|
$provider,
|
||||||
|
$customer,
|
||||||
|
$settings,
|
||||||
|
$recipient,
|
||||||
|
$reason
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// TODO: Port logic from engine/Notifications/Email.php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send an email notification with the new password, used when recovering an account.
|
||||||
|
*
|
||||||
|
* @param string $password
|
||||||
|
* @param string $recipient
|
||||||
|
* @param string $settings
|
||||||
|
*/
|
||||||
|
public function send_new_password($password, $recipient, $settings)
|
||||||
|
{
|
||||||
|
// TODO: Port logic from engine/Notifications/Email.php
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue