Welcome Guest, Not a member yet? Register   Sign In
My own classes and the code used everytime
#1

[eluser]Rvnikita[/eluser]
Hi!
First off all thanks you very much because ofCodeigniter.
I use it and i like it, but I have 2 questions:

1) I have some code, that I used everytime on site, for example some initial code, that i must call in every controller in every function (before the execution)
Now I made a init model and in every controller first off all i call it
Code:
$this->load->model('init_m');
$this->init_m->make_init();

How can I wrote init code, that will be automaticly call before any controller?

2) I need some class, for example user class with different params and functions.
Code:
$user->name, $user->surname, $user->is_18_year_old()
How can i do it right?

Thank's you very much and sorry for my english .(


Messages In This Thread
My own classes and the code used everytime - by El Forum - 11-01-2008, 05:34 PM
My own classes and the code used everytime - by El Forum - 11-01-2008, 06:45 PM
My own classes and the code used everytime - by El Forum - 11-02-2008, 01:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB