INFRA-132 - Change "else if" to "elseif"
[civicrm-core.git] / CRM / Utils / ICalendar.php
index 3bef59fdb4b9f333613cb6931a1a96eff3ae0fc9..f9d63c270f9927c43532e0c139b800c961a9371c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -45,12 +45,13 @@ class CRM_Utils_ICalendar {
   /**
    * Escape text elements for safe ICalendar use
    *
-   * @param $text Text to escape
+   * @param $text
+   *   Text to escape.
    *
    * @return  Escaped text
    *
    */
-  static function formatText($text) {
+  public static function formatText($text) {
     $text = strip_tags($text);
     $text = str_replace("\"", "DQUOTE", $text);
     $text = str_replace("\\", "\\\\", $text);
@@ -64,13 +65,14 @@ class CRM_Utils_ICalendar {
   /**
    * Escape date elements for safe ICalendar use
    *
-   * @param $date Date to escape
+   * @param $date
+   *   Date to escape.
    *
    * @param bool $gdata
    *
    * @return  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",
@@ -85,29 +87,25 @@ class CRM_Utils_ICalendar {
   }
 
   /**
-   *
    * Send the ICalendar to the browser with the specified content type
    * - 'text/calendar' : used for downloaded ics file
    * - '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 null $fileName
-   * @param string $disposition How the file should be sent ('attachment' for downloads)
-   *
-   * @internal param string $filename The file name (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");
@@ -125,4 +123,3 @@ class CRM_Utils_ICalendar {
     echo $calendar;
   }
 }
-