Welcome Guest, Not a member yet? Register   Sign In
Components and Libraries

[eluser]Roni Peterson[/eluser]
Hi everyone!

I'm trying understand how can I use components, or this idea, in CodeIgniter. The purpose is disconnect some areas into my page to reuse determined common areas like a area of login or a area that will be an information that must be present into any views.

Also, this area will have some functionality, in the example of login area, the component must detect the state after login and then show a panel with options like "logout".

I read one comment about components in http://ellislab.com/forums/viewthread/116005/ where the author (Dam1an) says:

"A librray is a set of relation functionality, and when using OOP, it represents an object, such as a user.
The idea is that it should be reusable, whereas controller logic is pretty specific to that app (although you can do a fair bot of copy and pasting between apps)

As for helpers, they’re also related bits of functionality, but each function works on its own, whereas in a lirary, it will often depend on class variables"

Please, can anyone help me understand this ideia in CodeIgniter ?

Thank you!

[eluser]Roni Peterson[/eluser]
Is correct, into a controller, make a instance of other controller to do something ?

Theme © iAndrew 2016 - Forum software by © MyBB