Loading namespaced classes with Symfony 1.4's autoloader?

后端 未结 3 1498
独厮守ぢ
独厮守ぢ 2021-02-03 13:07

How to register namespaces (with PHP 5.3) in the Symfony 1.4 for the autoloader class feature (like the Symfony 2.0)?

3条回答
  •  终归单人心
    2021-02-03 14:09

    Symfony uses the spl_autoload_register() function to register its own autoloader (sfAutoload).

    You can register your own handler in the initialize() function of your Project/Application/Plugin. (whichever applies).

    This is, for example, also what the Swift_Mailer plugin does: it registers its own autoloader when needed.

提交回复
热议问题