Welcome Guest, Not a member yet? Register   Sign In
Classes that aren't models or libraries
#5

[eluser]WanWizard[/eluser]
Whenever you load a model or library, the loader loads these, and instantiate them.

Sometimes you need to load a PHP file that contains a class without instantiation, because you don't need the singleton pattern. Instead, you want to be able to do that manually using "new Class();".

The quickest way is the old-fashioned way: simply use "require_once" to load them. It doesn't matter where they are stored, although I prefer to store them in the 'classes' directory within the application folder.


Messages In This Thread
Classes that aren't models or libraries - by El Forum - 07-18-2010, 06:47 PM
Classes that aren't models or libraries - by El Forum - 07-18-2010, 10:14 PM
Classes that aren't models or libraries - by El Forum - 07-18-2010, 11:01 PM
Classes that aren't models or libraries - by El Forum - 07-18-2010, 11:15 PM
Classes that aren't models or libraries - by El Forum - 07-19-2010, 12:16 AM
Classes that aren't models or libraries - by El Forum - 07-19-2010, 12:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB