Merge pull request #4759 from totten/master-civimail-status
[civicrm-core.git] / CRM / Utils / PseudoConstant.php
index 92efe7e0d4b80ea17d2bd035d51f88192eab002a..6c2dc9e883b56d6c268b1b730efabc5989e7603b 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -54,6 +54,8 @@ class CRM_Utils_PseudoConstant {
    * @access public
    * @static
    *
+   * @param $constant
+   *
    * @return array - array reference of all relevant constant
    */
   public static function getConstant($constant) {
@@ -73,6 +75,8 @@ class CRM_Utils_PseudoConstant {
    * @access public
    * @static
    *
+   * @param $constant
+   *
    * @return array - array reference of all relevant constant
    */
   public static function flushConstant($constant) {
@@ -93,7 +97,9 @@ class CRM_Utils_PseudoConstant {
    * If there's a full, preloaded map, use it. Otherwise, use search
    * class space.
    *
-   * @param string $name constant-name
+   * @param $constant
+   *
+   * @internal param string $name constant-name
    * @return string|NULL class-name
    */
   public static function findConstantClass($constant) {
@@ -134,6 +140,8 @@ class CRM_Utils_PseudoConstant {
    *
    * This may be inefficient and should generally be avoided.
    *
+   * @param $class
+   *
    * @return array of string, constant names
    */
   public static function findConstantsByClass($class) {
@@ -155,5 +163,6 @@ class CRM_Utils_PseudoConstant {
     foreach (self::findConstants() as $constant) {
       self::flushConstant($constant);
     }
+    CRM_Core_PseudoConstant::flush();
   }
 }