Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以便在必要时可以自动加载行为模板。
我对复杂的设置感到困惑。
我把它们放在 lib/doctrine 中,如果还有一个监听器,把它放在 lib/doctrine/listener 中。
Symfony 的自动加载器会找到类并在几乎任何你放置它们的地方为你加载它们(只要它的逻辑模糊)。唯一的例外是如果您创建一个新的供应商文件夹,您需要告诉自动加载器也检查那里。