File path: dist/twist/Core/Controllers/BaseAJAX.controller.php
Namespace: Twist\Core\Controllers
Extends: Base
Type: Controller
BaseAJAX
— An AJAX base controller that can be used instead of Base when adding AJAX support to your site. This controller should be used as an extension to a route controller class.
<?php
/** --------- Option 1 --------- */
//Register a dynamic route that will direct all function requests to the controller
Twist::Route() -> controller('/baseajax%','\Twist\Core\Controllers\BaseAJAX');
/** --------- Option 2 --------- */
//Or you can register a route to only direct the current request to a particular controller method
Twist::Route() -> get('/baseajax/_ajaxsucceed',array('\Twist\Core\Controllers\BaseAJAX','_ajaxSucceed'));
Method | Access | Returns |
---|---|---|
_baseCalls | public | void |
_ajaxStatus | public | void |
_ajaxSucceed | public | void |
_ajaxFail | public | void |
_ajaxMessage | public | void |
_ajaxRespond | public | void |