aboutsummaryrefslogtreecommitdiff
path: root/src/bdrem/Renderer/Mail.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2014-03-20 17:03:06 +0100
committerChristian Weiske <cweiske@cweiske.de>2014-03-20 17:03:06 +0100
commit6032c11d7a88651d85154ffe835a26b3f569c893 (patch)
treeb3cb83cb8d7dbcfa23891b84e3f0447c31e743c8 /src/bdrem/Renderer/Mail.php
parent62842c0ba16bb1dc67435dea7b4d75af7773eacb (diff)
downloadbdrem-6032c11d7a88651d85154ffe835a26b3f569c893.tar.gz
bdrem-6032c11d7a88651d85154ffe835a26b3f569c893.zip
add docblocks to all files, classes, methods and variables
Diffstat (limited to 'src/bdrem/Renderer/Mail.php')
-rw-r--r--src/bdrem/Renderer/Mail.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/bdrem/Renderer/Mail.php b/src/bdrem/Renderer/Mail.php
index 8e0e625..bc7e220 100644
--- a/src/bdrem/Renderer/Mail.php
+++ b/src/bdrem/Renderer/Mail.php
@@ -1,10 +1,44 @@
<?php
+/**
+ * Part of bdrem
+ *
+ * PHP version 5
+ *
+ * @category Tools
+ * @package Bdrem
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @copyright 2014 Christian Weiske
+ * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
+ * @link http://cweiske.de/bdrem.htm
+ */
namespace bdrem;
require_once 'Mail/mime.php';
+/**
+ * Send out mails
+ *
+ * @category Tools
+ * @package Bdrem
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @copyright 2014 Christian Weiske
+ * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
+ * @version Release: @package_version@
+ * @link http://cweiske.de/bdrem.htm
+ */
class Renderer_Mail extends Renderer
{
+ /**
+ * Render the events - send out mails.
+ *
+ * Uses the config's "mail_to" array as recipients.
+ * Sends out a single mail for each recipient.
+ * Config "mail_from" can also be used.
+ *
+ * @param array $arEvents Array of events to display
+ *
+ * @return void
+ */
public function render($arEvents)
{
$todays = array();
@@ -49,6 +83,15 @@ class Renderer_Mail extends Renderer
}
}
+ /**
+ * Shorten the given string to the specified length.
+ * Adds ... when the string was too long
+ *
+ * @param string $str String to shorten
+ * @param integer $len Maximum length of the string
+ *
+ * @return string Shortened string
+ */
protected function shorten($str, $len)
{
if (mb_strlen($str) <= $len) {