tp3.2.3 controller Inheritance Issues-I don't understand.
For example, to login to verify, I used to use the TP3.1.2 version, directly create a new Conn controller class, and then use this conn class to inherit the action class, the Conn class with _initialize () {} to implement the validation settings, If no session is adjusted to the login controller to log in, other classes that need to be validated inherit Connaction.class class, but in 3.2.3 This version I don't know how to use, I found a pre-control method _before_index () But this method can only be used in a single controller, how to use the global?
------to solve the idea----------------------
Make a judgment login or not class inherit Controller other ways to inherit your class
Then there is a login page that also inherits the Controller
Similar
Class Basecontroller extends Controller
{
Public Function _before_index ()
{
------to solve the idea----------------------
Session ('? username ') = = FALSE) {
$this->redirect ('/index.php/home/login/index ');
Exit
} else {
}
}
}