ajaxMethod($method) === true) { $actions->{$method}(); } else { $actions->error('Unavailable method.'); } } else { $actions->error('Method not found. ['.$method.']'); } // Stop any execution. exit;