Welcome Guest, Not a member yet? Register   Sign In
General question about framework extensions (also Ion Auth)
#1

[eluser]Eric_WVGG[/eluser]
Hello, I'm an experienced PHP dev but new to formal frameworks. I'm adding Ion Auth to a project and have a question about "best practices."

What I'm specifically wondering is, what's the best way to call the Auth controller? Should I be extending the Auth class [first example below], calling the Auth class from within my own controller [second example], or just edit the Auth controller to call my own views and whatnot? [this seems crazy so I won't bother outlining it]

... examples

<code>Class My_Auth extends Auth {
function __construct() {
parent::__construct();
}
function index() {
$this->load->view( 'my_header' );
parent::index();
$this->load->view( 'my_footer' );
}
...</code>

vs

<code>
Class My_Auth extends Controller {
function index() {
$auth = new Auth;
// do stuff
}
...</code>

Thank you in advance for any thoughts.


Messages In This Thread
General question about framework extensions (also Ion Auth) - by El Forum - 06-14-2010, 03:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB