<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | 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_Member_PseudoConstant extends CRM_Core_PseudoConstant {
/**
- * membership types
+ * Membership types.
* @var array
- * @static
*/
private static $membershipType;
/**
- * membership types
+ * Membership types.
* @var array
- * @static
*/
private static $membershipStatus;
/**
- * Get all the membership types
+ * Get all the membership types.
*
- * @access public
*
- * @param null $id
+ * @param int $id
* @param bool $force
*
- * @return array - array reference of all membership types if any
- * @static
+ * @return array
+ * array reference of all membership types if any
*/
- public static function &membershipType($id = NULL, $force = FALSE) {
+ public static function membershipType($id = NULL, $force = TRUE) {
if (!self::$membershipType || $force) {
CRM_Core_PseudoConstant::populate(self::$membershipType,
'CRM_Member_DAO_MembershipType',
}
/**
- * Get all the membership statuss
+ * Get all the membership statuss.
*
- * @access public
*
- * @param null $id
+ * @param int $id
* @param null $cond
* @param string $column
* @param bool $force
*
- * @return array - array reference of all membership statuss if any
- * @static
+ * @param bool $allStatus
+ *
+ * @return array
+ * array reference of all membership statuses if any
*/
public static function &membershipStatus($id = NULL, $cond = NULL, $column = 'name', $force = FALSE, $allStatus = FALSE) {
if (self::$membershipStatus === NULL) {
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @access public
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
public static function flush($name = 'cache') {
- if (isset(self::$$name)) {
+ if (isset(self::$$name)) {
self::$$name = NULL;
}
}
-}
+}