Welcome Guest, Not a member yet? Register   Sign In
My own classes and codeigniter
#2

[eluser]Aleazus[/eluser]
This sounds like a MVC question to me. I would suggest creating a controller class called deck.php which would start off with a class of course:

class Deck extends Controller{

function index(){
}
}


Within index you can call your functions that you have within this controller. Now say you want to seperate out functions to a model for database insertion. Create a model called cards_model.php and put all your functions that you want in there. Then refer back to them by calling:

$this->load->model('cards');
$this->model->cards('sort_deck');

Hope this helps
-Sean


Messages In This Thread
My own classes and codeigniter - by El Forum - 11-15-2010, 04:20 PM
My own classes and codeigniter - by El Forum - 11-15-2010, 05:15 PM
My own classes and codeigniter - by El Forum - 11-16-2010, 12:57 AM
My own classes and codeigniter - by El Forum - 11-16-2010, 08:00 AM
My own classes and codeigniter - by El Forum - 11-16-2010, 10:10 AM
My own classes and codeigniter - by El Forum - 11-16-2010, 10:24 AM
My own classes and codeigniter - by El Forum - 11-16-2010, 10:29 AM
My own classes and codeigniter - by El Forum - 11-16-2010, 04:06 PM
My own classes and codeigniter - by El Forum - 11-18-2010, 07:49 AM
My own classes and codeigniter - by El Forum - 11-18-2010, 09:48 AM
My own classes and codeigniter - by El Forum - 11-18-2010, 02:31 PM
My own classes and codeigniter - by El Forum - 11-18-2010, 05:34 PM
My own classes and codeigniter - by El Forum - 11-19-2010, 03:15 AM
My own classes and codeigniter - by El Forum - 11-19-2010, 05:19 AM
My own classes and codeigniter - by El Forum - 11-19-2010, 11:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB