Exemple #1
0
 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;
 }