[ Index ] |
PHP Cross Reference of ACL Module |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * This file contains all the Business-Rules 4 * 5 * @author dispy <dispyfree@googlemail.com> 6 * @license LGPLv2 7 * @package acl.base 8 */ 9 class BusinessRules { 10 11 /** 12 * If you have a rule named "Rule", you can define it in two ways: 13 * a) a public static function isRule of this class 14 * b) an entry "isRule" => "myFunc" where myFunc is a static function in 15 * this class 16 * @var array ruleName => functionName 17 */ 18 public static $ruleMap = array(); 19 20 /** 21 * prototype: 22 * public static function isRule($aro, $aco, $action) 23 */ 24 25 public static function isbla($aro, $aco, $action){ 26 return false; 27 } 28 29 public static function ispicGroup($aro, $aco, $action){ 30 return true; 31 } 32 33 public static function fulfillsBusinessRule($rule, $aro, $aco, $action){ 34 $rule = isset(self::$ruleMap[$rule]) ? self::$ruleMap[$rule] : $rule; 35 if(!method_exists(__CLASS__, $rule)) 36 //If there's no rule defined, simply return false 37 return false; 38 else{ 39 return self::$rule($aro, $aco, $action); 40 } 41 } 42 } 43 44 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jul 1 19:24:45 2012 | Cross-referenced by PHPXref 0.7.1 |