コード例 #1
0
ファイル: Rules.php プロジェクト: dsyman2/X2CRM
 public static function applyRules($model, $version)
 {
     if ($model instanceof Contacts) {
         $model = Rules::contactRules($model, $version);
     } else {
         if ($model instanceof Users) {
             $model = Rules::userRules($model, $version);
         } else {
             if ($model instanceof Opportunity) {
                 $model = Rules::opportunityRules($model, $version);
             } else {
                 if ($model instanceof Actions) {
                     $model = Rules::actionsRules($model, $version);
                 } else {
                     if ($model instanceof Accounts) {
                         $model = Rules::accountRules($model, $version);
                     } else {
                         if ($model instanceof Profile) {
                             $model = Rules::profileRules($model, $version);
                         } else {
                         }
                     }
                 }
             }
         }
     }
     return $model;
 }