iflrandevu/doc/code/php/class-Notifications.html
2015-01-28 23:56:57 +01:00

401 lines
13 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class Notifications</title>
<link rel="stylesheet" href="resources/bootstrap.min.css?08b23951ef4599ca9cbf1f902d0e8290c9653ddd">
<link rel="stylesheet" href="resources/style.css?062e9e59e0b8c44fbaaded5b7ffc21f907b78669">
</head>
<body>
<div id="navigation" class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a href="index.html" class="brand">Overview</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active">
<span>Class</span> </li>
<li class="divider-vertical"></li>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="left">
<div id="menu">
<form id="search" class="form-search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="search-query" placeholder="Search">
</form>
<div id="groups">
</div>
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Admins_Model.html">Admins_Model</a></li>
<li><a href="class-Appointments.html">Appointments</a></li>
<li><a href="class-Appointments_Model.html">Appointments_Model</a></li>
<li><a href="class-Backend.html">Backend</a></li>
<li><a href="class-Backend_api.html">Backend_api</a></li>
<li><a href="class-Customers_Model.html">Customers_Model</a></li>
<li><a href="class-Errors.html">Errors</a></li>
<li><a href="class-Google.html">Google</a></li>
<li><a href="class-Google_Sync.html">Google_Sync</a></li>
<li class="active"><a href="class-Notifications.html">Notifications</a></li>
<li><a href="class-Providers_Model.html">Providers_Model</a></li>
<li><a href="class-Roles_Model.html">Roles_Model</a></li>
<li><a href="class-Secretaries_Model.html">Secretaries_Model</a></li>
<li><a href="class-Services_Model.html">Services_Model</a></li>
<li><a href="class-Settings_Model.html">Settings_Model</a></li>
<li><a href="class-Test.html">Test</a></li>
<li><a href="class-Unit_tests.html">Unit_tests</a></li>
<li><a href="class-Unit_tests_admins_model.html">Unit_tests_admins_model</a></li>
<li><a href="class-Unit_tests_appointments_model.html">Unit_tests_appointments_model</a></li>
<li><a href="class-Unit_tests_customers_model.html">Unit_tests_customers_model</a></li>
<li><a href="class-Unit_tests_providers_model.html">Unit_tests_providers_model</a></li>
<li><a href="class-Unit_tests_secretaries_model.html">Unit_tests_secretaries_model</a></li>
<li><a href="class-Unit_tests_services_model.html">Unit_tests_services_model</a></li>
<li><a href="class-Unit_tests_settings_model.html">Unit_tests_settings_model</a></li>
<li><a href="class-User.html">User</a></li>
<li><a href="class-User_Model.html">User_Model</a></li>
</ul>
<h3>Interfaces</h3>
<ul>
<li><a href="class-Admins_Model.html">Admins_Model</a></li>
<li><a href="class-Appointments.html">Appointments</a></li>
<li><a href="class-Appointments_Model.html">Appointments_Model</a></li>
<li><a href="class-Backend.html">Backend</a></li>
<li><a href="class-Backend_api.html">Backend_api</a></li>
<li><a href="class-Customers_Model.html">Customers_Model</a></li>
<li><a href="class-Errors.html">Errors</a></li>
<li><a href="class-Google.html">Google</a></li>
<li><a href="class-Google_Sync.html">Google_Sync</a></li>
<li class="active"><a href="class-Notifications.html">Notifications</a></li>
<li><a href="class-Providers_Model.html">Providers_Model</a></li>
<li><a href="class-Roles_Model.html">Roles_Model</a></li>
<li><a href="class-Secretaries_Model.html">Secretaries_Model</a></li>
<li><a href="class-Services_Model.html">Services_Model</a></li>
<li><a href="class-Settings_Model.html">Settings_Model</a></li>
<li><a href="class-Test.html">Test</a></li>
<li><a href="class-Unit_tests.html">Unit_tests</a></li>
<li><a href="class-Unit_tests_admins_model.html">Unit_tests_admins_model</a></li>
<li><a href="class-Unit_tests_appointments_model.html">Unit_tests_appointments_model</a></li>
<li><a href="class-Unit_tests_customers_model.html">Unit_tests_customers_model</a></li>
<li><a href="class-Unit_tests_providers_model.html">Unit_tests_providers_model</a></li>
<li><a href="class-Unit_tests_secretaries_model.html">Unit_tests_secretaries_model</a></li>
<li><a href="class-Unit_tests_services_model.html">Unit_tests_services_model</a></li>
<li><a href="class-Unit_tests_settings_model.html">Unit_tests_settings_model</a></li>
<li><a href="class-User.html">User</a></li>
<li><a href="class-User_Model.html">User_Model</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<div id="content" class="class">
<h1>Class Notifications</h1>
<div class="description">
<p>This library handles all the notification email deliveries
on the system.</p>
<p>Custom system settings for the notification section are loaded
during the execution of each class methods.</p>
</div>
<div class="alert alert-info">
<b>Located at</b> <a href="source-class-Notifications.html#5-256" title="Go to source code">notifications.php</a>
<br>
</div>
<h2>Methods summary</h2>
<table class="summary table table-bordered table-striped methods" id="methods">
<tr data-order="__construct" id="___construct">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-Notifications.html#15-20" title="Go to source code">__construct</a>( )</code>
<div class="description short">
<p>Class Constructor</p>
</div>
<div class="description detailed hidden">
<p>Class Constructor</p>
</div>
</div></td>
</tr>
<tr data-order="send_appointment_details" id="_send_appointment_details">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_send_appointment_details">#</a>
<code><a href="source-class-Notifications.html#43-120" title="Go to source code">send_appointment_details</a>( <span>array <var>$appointment_data</var></span>, <span>array <var>$provider_data</var></span>, <span>array <var>$service_data</var></span>, <span>array <var>$customer_data</var></span>, <span>string <var>$company_settings</var></span>, <span>string <var>$title</var></span>, <span>string <var>$message</var></span>, <span>string <var>$appointment_link</var></span>, <span> <var>$receiver_address</var></span> )</code>
<div class="description short">
<p>Send an email with the appointment details.</p>
</div>
<div class="description detailed hidden">
<p>Send an email with the appointment details.</p>
<p>This email template also needs an email title and an email text in order to complete
the appointment details.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$appointment_data</var></dt>
<dd>Contains the appointment data.</dd>
<dt><var>$provider_data</var></dt>
<dd>Contains the provider data.</dd>
<dt><var>$service_data</var></dt>
<dd>Contains the service data.</dd>
<dt><var>$customer_data</var></dt>
<dd><p>$company_settings Contains settings of the company. By the time the
"company_name", "company_link" and "company_email" values are required in the array.</p></dd>
<dt><var>$company_settings</var></dt>
<dd>$title The email title may vary depending the receiver.</dd>
<dt><var>$title</var></dt>
<dd>$message The email message may vary depending the receiver.</dd>
<dt><var>$message</var></dt>
<dd><p>$appointment_link This link is going to enable the receiver to make changes
to the appointment record.</p></dd>
<dt><var>$appointment_link</var></dt>
<dd>$receiver_address The receiver email address.</dd>
<dt><var>$receiver_address</var></dt>
<dd></dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
boolean<br>Returns the operation result.
</div>
<h4>Expectedexception</h4>
<div class="list">
Exception Raises when an unexpected error occures.<br>
</div>
</div>
</div></td>
</tr>
<tr data-order="send_delete_appointment" id="_send_delete_appointment">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_send_delete_appointment">#</a>
<code><a href="source-class-Notifications.html#122-193" title="Go to source code">send_delete_appointment</a>( <span>array <var>$appointment_data</var></span>, <span>array <var>$provider_data</var></span>, <span>array <var>$service_data</var></span>, <span>array <var>$customer_data</var></span>, <span>array <var>$company_settings</var></span>, <span>string <var>$to_address</var></span>, <span>string <var>$reason</var></span> )</code>
<div class="description short">
<p>Send an email notification to both provider and customer on appointment removal.</p>
</div>
<div class="description detailed hidden">
<p>Send an email notification to both provider and customer on appointment removal.</p>
<p>Whenever an appointment is cancelled or removed, both the provider and customer
need to be informed. This method sends the same email twice.</p>
<p><strong>IMPORTANT!</strong> This method's arguments should be taken
from database before the appointment record is deleted.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$appointment_data</var></dt>
<dd>The record data of the removed appointment.</dd>
<dt><var>$provider_data</var></dt>
<dd>The record data of the appointment provider.</dd>
<dt><var>$service_data</var></dt>
<dd>The record data of the appointment service.</dd>
<dt><var>$customer_data</var></dt>
<dd>The record data of the appointment customer.</dd>
<dt><var>$company_settings</var></dt>
<dd><p>Some settings that are required for this function.
By now this array must contain the following values: "company_link",
"company_name", "company_email".</p></dd>
<dt><var>$to_address</var></dt>
<dd>The email address of the email receiver.</dd>
<dt><var>$reason</var></dt>
<dd>The reason why the appointment is deleted.</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="send_password" id="_send_password">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_send_password">#</a>
<code><a href="source-class-Notifications.html#195-231" title="Go to source code">send_password</a>( <span>string <var>$password</var></span>, <span>string <var>$email</var></span>, <span> <var>$company_settings</var></span> )</code>
<div class="description short">
<p>This method sends an email with the new password of a user.</p>
</div>
<div class="description detailed hidden">
<p>This method sends an email with the new password of a user.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$password</var></dt>
<dd>Contains the new password.</dd>
<dt><var>$email</var></dt>
<dd>The receiver's email address.</dd>
<dt><var>$company_settings</var></dt>
<dd></dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="send_new_installation" id="_send_new_installation">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_send_new_installation">#</a>
<code><a href="source-class-Notifications.html#233-255" title="Go to source code">send_new_installation</a>( <span> <var>$company_name</var></span>, <span> <var>$company_email</var></span>, <span> <var>$company_link</var></span> )</code>
<div class="description short">
<p>Sends a simple email to notify for a new installation.</p>
</div>
<div class="description detailed hidden">
<p>Sends a simple email to notify for a new installation.</p>
<p>This method will be only used for tracking the number of installations. No personal
data will be retrieved for any other cause.</p>
<h4>Returns</h4>
<div class="list">
bool Returns the "send()" method result.<br>
</div>
</div>
</div></td>
</tr>
</table>
<h3>Magic methods summary</h3>
</div>
</div>
<div id="footer">
API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>