Welcome Guest, Not a member yet? Register   Sign In
include controllers as you would a normal .php page
#5

[eluser]John_Betong[/eluser]
[quote author="rossmurphy" date="1248416157"]Hmm, a library may be the way to go. Is it possible to access methods in controllers from a library?[/quote]
 
I reckon you should just play about with the simple licrary examples given in the User Guide, get a "feel for them", then try to apply the libraries to your particular application.
 
>>> Is it possible to access methods in controllers from a library?
Maybe since CodeIgniter can be used or abused and is not rigid.
 
I think the MVC way is to access the library methods from your controller and not to access the controller methods from your library:
 
Try this:

1. include the library into your controller
2. call the methods in your library
3. load "partial views" with your data
4. output the data to your view
 
 
 


Messages In This Thread
include controllers as you would a normal .php page - by El Forum - 07-23-2009, 09:51 AM
include controllers as you would a normal .php page - by El Forum - 07-23-2009, 11:01 AM
include controllers as you would a normal .php page - by El Forum - 07-23-2009, 05:51 PM
include controllers as you would a normal .php page - by El Forum - 07-23-2009, 07:15 PM
include controllers as you would a normal .php page - by El Forum - 07-23-2009, 07:53 PM
include controllers as you would a normal .php page - by El Forum - 07-23-2009, 08:37 PM
include controllers as you would a normal .php page - by El Forum - 07-23-2009, 09:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB