Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. class AR {
  2.     //make $dbh so index can set it;
  3.     public $dbh;
  4.     public function changeTask($task) {
  5.         //make sure task is set and is a string.
  6.         if(isset($task) && is_string($task)) {
  7.             //switch task
  8.             switch($task) {
  9.                 case 'version_check':
  10.                     //make sure the method exists before calling it :)
  11.                     if(method_exists(__CLASS__,"version_check")) {
  12.                         $this->version_check();
  13.                     }
  14.                 break;
  15.             }
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement