Implementing Zend Framework 2 Autoloader
-
30-06-2021 - |
سؤال
Is it possible to replace ZF1 Autoloader with ZF2 Autoloader, as it seems that it could significantly increase performance ?
I didn't find any tutorials out there neither much material on this - I've just heard ZF2's Autoloader would be much faster.
المحلول
As ZF1 codebase uses require_once
to include dependencies, ZF1 autoloader relies on include path which leads to poor performance results.
Migrating to ZF2 autoloader (or Composer's one) will not have a significant performance impact.
نصائح أخرى
You could update to Zend Framework v1.12, which backports some of the new autoloader functions from Zend Framework v2, see http://devzone.zend.com/2554/zend-framework-1-12-0-stable-released/
لا تنتمي إلى StackOverflow