Ian province abbreviation patch - issue 724
[civicrm-core.git] / Civi / API / Subscriber / I18nSubscriber.php
index c5d36e6c24395b086340d0761de391dda3e33a05..58d325ba738f7406720a5d4f4df8f8e1506d3421 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 namespace Civi\API\Subscriber;
+
 use Civi\API\Events;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 
@@ -39,12 +40,13 @@ class I18nSubscriber implements EventSubscriberInterface {
    */
   public static function getSubscribedEvents() {
     return array(
-      Events::PREPARE => array('onApiPrepare', Events::W_MIDDLE)
+      Events::PREPARE => array('onApiPrepare', Events::W_MIDDLE),
     );
   }
 
   /**
    * @param \Civi\API\Event\Event $event
+   *   API preparation event.
    *
    * @throws \API_Exception
    */
@@ -61,6 +63,8 @@ class I18nSubscriber implements EventSubscriberInterface {
    * Sets the tsLocale and dbLocale for multi-lingual sites.
    * Some code duplication from CRM/Core/BAO/ConfigSetting.php retrieve()
    * to avoid regressions from refactoring.
+   * @param $lcMessagesRequest
+   * @throws \API_Exception
    */
   public function setLocale($lcMessagesRequest) {
     // We must validate whether the locale is valid, otherwise setting a bad
@@ -103,4 +107,5 @@ class I18nSubscriber implements EventSubscriberInterface {
       }
     }
   }
+
 }