所以我刚刚将 Pimple 集成到一个项目中,我现在的情况是我有一个文件:
/application/config/pimple.php
其中包含 400 多个:
/* Instantiate new Class */
$this->container['Some_class'] = $this->container->factory(function ($c)
{
require_once "application/classes/some/class.php";
return new Class();
});
我的问题是:这是常态吗?我应该担心这个吗?有更好的方法吗?