[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.