R
R
Roman Hinex2014-12-04 02:30:44
PHP
Roman Hinex, 2014-12-04 02:30:44

Twig and two autoloaders, how to resolve?

I have a project on my own microframework, I try to tie Twig using its native autoloader, as a result I get a conflict, the classes necessary for the framework to work try to knock not through the native autoloader, but through Twig called in the View. Who and how was able to overcome this phenomenon?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WebSpider, 2014-12-04
@HiNeX

Make your autoloader called before Twig's

S
Sergey, 2014-12-04
Protko @Fesor

For the sake of curiosity, how do you register your autoloader? I hope through spl_register_autoload? If so, then you just need to resolve this matter in the right order and there should be no problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question