Merge pull request #5714 from colemanw/uiSelect
[civicrm-core.git] / CRM / Utils / ICalendar.php
index b65cf36aa2ec4fb2044a7c505375f8d7ce6142bb..096ce70f7613bd45f648d32909ac526ec68b3af8 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Utils_ICalendar {
 
   /**
-   * Escape text elements for safe ICalendar use
-   *
-   * @param $text Text to escape
+   * Escape text elements for safe ICalendar use.
    *
-   * @return  Escaped text
+   * @param $text
+   *   Text to escape.
    *
+   * @return string
+   *   Escaped text
    */
-  static function formatText($text) {
+  public static function formatText($text) {
     $text = strip_tags($text);
     $text = str_replace("\"", "DQUOTE", $text);
     $text = str_replace("\\", "\\\\", $text);
@@ -62,15 +63,17 @@ class CRM_Utils_ICalendar {
   }
 
   /**
-   * Escape date elements for safe ICalendar use
+   * Escape date elements for safe ICalendar use.
    *
-   * @param $date Date to escape
+   * @param $date
+   *   Date to escape.
    *
    * @param bool $gdata
    *
-   * @return  Escaped date
+   * @return string
+   *   Escaped date
    */
-  static function formatDate($date, $gdata = FALSE) {
+  public static function formatDate($date, $gdata = FALSE) {
 
     if ($gdata) {
       return date("Y-m-d\TH:i:s.000",
@@ -90,17 +93,20 @@ class CRM_Utils_ICalendar {
    * - 'text/plain'    : used for iCal formatted feed
    * - 'text/xml'      : used for gData or rss formatted feeds
    *
-   * @access public
    *
-   * @param string $calendar The calendar data to be published.
+   * @param string $calendar
+   *   The calendar data to be published.
    * @param string $content_type
-   * @param string $charset The character set to use, defaults to 'us-ascii'.
-   * @param string $fileName The file name (for downloads)
-   * @param string $disposition How the file should be sent ('attachment' for downloads)
+   * @param string $charset
+   *   The character set to use, defaults to 'us-ascii'.
+   * @param string $fileName
+   *   The file name (for downloads).
+   * @param string $disposition
+   *   How the file should be sent ('attachment' for downloads).
    *
    * @return void
    */
-  static function send($calendar, $content_type = 'text/calendar', $charset = 'us-ascii', $fileName = NULL, $disposition = NULL) {
+  public static function send($calendar, $content_type = 'text/calendar', $charset = 'us-ascii', $fileName = NULL, $disposition = NULL) {
     $config = CRM_Core_Config::singleton();
     $lang = $config->lcMessages;
     header("Content-Language: $lang");
@@ -117,5 +123,5 @@ class CRM_Utils_ICalendar {
 
     echo $calendar;
   }
-}
 
+}