-
Notifications
You must be signed in to change notification settings - Fork 0
Ajax
Ajax controller.
This controller is in charge of every ajax call.
TODO: Having an Ajax controller doesn't make much sense to me. In my opignion, methods containes here should be distributed in related controller and properly documented as method expecting Ajax behaviour.
- Class name: Ajax
- Namespace:
- Parent class: MY_Controller
protected mixed $_headerData = array()
- Visibility: protected
protected mixed $_bodyData = array()
- Visibility: protected
protected mixed $_footerData = array()
- Visibility: protected
protected mixed $_needLoggedIn = false
- Visibility: protected
private object $instance
Reference to the CI singleton
- Visibility: private
- This property is static.
void CI_Controller::__construct()
Class constructor
- Visibility: public
- This method is defined by CI_Controller
Boolean Ajax::login()
Email password login method
- Visibility: public
boolean Ajax::checkEmail()
Checks if a given email already exists in the db
//TODO: This doesn't seams to be called from the client side but only used as helper method. If so, it should go private or relocated elsewhere.
- Visibility: public
\JSON Ajax::facebookSignup()
Facebook signup
Handle the signup and the signin for facebook signin button. If the user never signin with facebook on tw, we create an account for him. Otherwise, we just log him in his previously created account.
This method will return 'email' if the user tries to signup/signin with a facebook that habe an associated email we already have in our db.
- Visibility: public
boolean|mixed Ajax::signup()
Signup method. Create an accound for a new user.
- Visibility: public
boolean Ajax::askResetPassword()
Reset the password
- Visibility: public
boolean Ajax::resetPassword()
Reset the password of an user
- Visibility: public
boolean Ajax::contact()
Send an email to tw team through the contact form
TODO: Is this the right place for this ?
- Visibility: public
Boolean MY_Controller::expectsPost(Array $postNames)
Convenient method to check that variables have been posted.
In addition, all the variables contained in $postNames are copied in this. So you can access it by $this->myPostVariable.
- Visibility: protected
- This method is defined by MY_Controller
- $postNames Array - <p>name of the variables expected to be posted</p>
mixed MY_Controller::_remap(String $method, Array $params)
Intercepts all method call on controller in order to provide logging capabilities.
- Visibility: public
- This method is defined by MY_Controller
- $method String - <p>the method name</p>
- $params Array - <p>An array of get parameters (segments following the method segment)</p>
object CI_Controller::get_instance()
Get the CI singleton
- Visibility: public
- This method is static.
- This method is defined by CI_Controller