How to define all classes in PHP DI definitions.php?

29 views Asked by At

This is my definitions.php:

return [

  'Entity' => create(Entity::class),
  'Request' => create(Request::class)

]:

There can be many classes in a PHP project, do I have to manually register all the classes in the PHP DI container or there's a better way to do it automatically.

0

There are 0 answers