panique / mini2

Just an extremely simple naked PHP application, useful for small projects and quick prototypes.
MIT License
416 stars 102 forks source link

Global functions #30

Closed RosiersRobin closed 9 years ago

RosiersRobin commented 9 years ago

Hi,

I would like to know how i can make global functions and how to use them.

So let me give an example.

I have an sort of Core file, where i can get stuff out of my database and these outputs can i use everywhere in the .twig files like an {{ constant('whatever') }}.

I don't know how i can do this.

panique commented 9 years ago

Sorry, I cannot give personal support. Have a look on the code or simply don't use Twig.

Cheers

Am 17.11.2014 um 19:10 schrieb Robin:

Hi,

I would like to know how i can make global functions and how to use them.

So let me give an example.

I have an sort of Core file, where i can get stuff out of my database and these outputs can i use everywhere in the .twig files like an {{ constant('whatever') }}.

I don't know how i can do this.

— Reply to this email directly or view it on GitHub https://github.com/panique/php-mvc-advanced/issues/30.

RosiersRobin commented 9 years ago

You implanate twig by your selve, how can i change that to let me say smarty tpl or rain tpl ?