Welcome Guest, Not a member yet? Register   Sign In
Variables in all areas
#10

(This post was last modified: 04-10-2015, 12:38 PM by ivantcholakov. Edit Reason: A smile strike )

Code:
$some_result = ClassName::singleton()->method();
Something like this would be nice, but you have to implement it. :-)

Edit: To be more precise:
Code:
$some_result = ClassName::factory()->method();
http://en.wikipedia.org/wiki/Factory_(ob...ogramming)

Or you can make a static facade:
Code:
$some_result = ClassName::staticMethod();

In addition, you would need to have autoloading organized, based on spl_*() functions. I don't know whether going in this direction is worth-while for you, because CodeIgniter 3 seemingly would not help here, you are on your own.
Reply


Messages In This Thread
Variables in all areas - by sintakonte - 04-08-2015, 06:57 AM
RE: Variables in all areas - by sv3tli0 - 04-08-2015, 07:13 AM
RE: Variables in all areas - by sintakonte - 04-08-2015, 07:49 AM
RE: Variables in all areas - by cartalot - 04-08-2015, 08:47 AM
RE: Variables in all areas - by CroNiX - 04-08-2015, 09:11 AM
RE: Variables in all areas - by cartalot - 04-08-2015, 04:19 PM
RE: Variables in all areas - by sintakonte - 04-09-2015, 12:45 AM
RE: Variables in all areas - by ivantcholakov - 04-09-2015, 06:57 PM
RE: Variables in all areas - by sintakonte - 04-10-2015, 01:39 AM
RE: Variables in all areas - by ivantcholakov - 04-10-2015, 12:12 PM
RE: Variables in all areas - by ivantcholakov - 04-10-2015, 03:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB