<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
*
* @var integer const
*
- * @access public
*/
- CONST
+ const
NONE = 0,
ADD = 1,
UPDATE = 2,
*
* @var array $_names type of variable name to action constant
*
- * @access private
* @static
*
*/
* @param string $str the action to be resolved
*
* @return int the action mask corresponding to the input string
- * @access public
* @static
*/
- static function resolve($str) {
+ public static function resolve($str) {
$action = 0;
if ($str) {
$items = explode('|', $str);
* @param mixed $item either a single string or an array of strings
*
* @return int the action mask corresponding to the input args
- * @access public
* @static
*
*/
- static function map($item) {
+ public static function map($item) {
$mask = 0;
if (is_array($item)) {
* @param string $item the input action to process
*
* @return int the action mask corresponding to the input string
- * @access public
* @static
*
*/
- static function mapItem($item) {
+ public static function mapItem($item) {
$mask = CRM_Utils_Array::value(trim($item), self::$_names);
return $mask ? $mask : 0;
}
* @param int $mask the action mask
*
* @return string the corresponding action description
- * @access public
* @static
*
*/
- static function description($mask) {
+ public static function description($mask) {
if (!isset($_description)) {
self::$_description = array_flip(self::$_names);
}
* @param int $objectId
*
* @return string the html string
- * @access public
* @static
*/
static function formLink($links,
* @param array $values the array of values for parameter substitution in the str
*
* @return string the substituted string
- * @access public
* @static
*/
- static function &replace(&$str, &$values) {
+ public static function &replace(&$str, &$values) {
foreach ($values as $n => $v) {
$str = str_replace("%%$n%%", $v, $str);
}
*
* @return int the mask for the above permission
* @static
- * @access public
*/
- static function mask($permissions) {
+ public static function mask($permissions) {
$mask = NULL;
if (!is_array($permissions) || CRM_Utils_System::isNull($permissions)) {
return $mask;
return $mask;
}
}
-