Welcome Guest, Not a member yet? Register   Sign In
static model/helper
#11

[eluser]ferus[/eluser]
I was just looking for another solution, don't be angry at me Wink
After all - how may i refer to autoload constant after adding it to a autoload.php file?
#12

[eluser]Aken[/eluser]
I'm not angry, I just don't understand why you're excluding yourself from good development practices. You're making your application do WAY more work than it needs to.

You could just add these constants to your config/constants.php file, and they'd be available to the entire scope of your application. And you'd be done. Easy easy easy, so why prevent yourself from doing it?
#13

[eluser]ferus[/eluser]
I've been just looking for something different from including config files, that's all Wink
Again, may you give me an example of using it and calling within application?
Many thanks.
#14

[eluser]Aken[/eluser]
Sorry, but I don't offer solutions that I wouldn't personally use or aren't up to my standards. Maybe someone else can offer a solution.
#15

[eluser]ferus[/eluser]
Sorry for missunderstood, sometimes i write faster than i think
I was talking about giving me an example of our solution (adding constant to constants.php within config directory)
#16

[eluser]Aken[/eluser]
Open config/constants.php and either define constants as normal, or add your static class. Whichever you prefer.




Theme © iAndrew 2016 - Forum software by © MyBB