Skip to content
Snippets Groups Projects
Commit d8305168 authored by Tim Steiner's avatar Tim Steiner
Browse files

Adding a few PHPDoc blocks.

parent fb98d66d
No related branches found
No related tags found
No related merge requests found
<?php
/**
* Provides an interface for creating additional Approval Action types.
* An approval action represents a point at which some entity may potentially
* modify a request and then make a decision about the request (by modifying
* its status). A Model implementing this interface will be a child of Unl_Model.
*/
interface App_Model_ApprovalActionInterface
{
/**
......
<?php
/**
* This class handles the generation and scheduling of email notifications
* that alert users of requests that are pending their decisions.
*/
class App_RequestNotification
{
/**
* Stores the list of notifications once it has been generated to avoid
* needlessly reproccessing it.
*
* @var array
*/
static protected $_notifications;
/**
* Does the work of processing which users have pending requests and populates
* $_notifications with the list.
*/
static protected function _loadNotifications()
{
if (Unl_Util::isArray(self::$_notifications)) {
......@@ -81,6 +96,10 @@ class App_RequestNotification
}
}
/**
* Prints out a simple list of the notifications in plain text.
* Mainly useful when debugging.
*/
public static function listNotifications()
{
self::_loadNotifications();
......@@ -93,6 +112,9 @@ class App_RequestNotification
}
}
/**
* Sends out an email to each user who has pending requests.
*/
public static function sendNotifications()
{
self::_loadNotifications();
......@@ -150,6 +172,10 @@ EOF
}
}
/**
* Sends out email notifications, then schedules itself to be called again in two days.
* This should really only be called by a cron job.
*/
public static function scheduledNotifications()
{
self::sendNotifications();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment