Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AR {
- //make $dbh so index can set it;
- public $dbh;
- public function changeTask($task) {
- //make sure task is set and is a string.
- if(isset($task) && is_string($task)) {
- //switch task
- switch($task) {
- case 'version_check':
- //make sure the method exists before calling it :)
- if(method_exists(__CLASS__,"version_check")) {
- $this->version_check();
- }
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement