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