dxw / whippet-theme-template

This repo holds the template for a Whippet-enabled theme.
2 stars 1 forks source link

Think about dependency injection containers #10

Closed mallorydxw closed 8 years ago

mallorydxw commented 8 years ago

There are some DI containers for PHP. We should consider using one.

i.e. http://php-di.org/

Most themes won't benefit hugely from this, but when the object graph construction gets a little more complex, they may be helpful.

Once we have this, it might make sense to add a class whose sole role is to call the register() on the instantiated classes.

mallorydxw commented 8 years ago

See this: https://github.com/dxw/ukti-eig-app/pull/195

mallorydxw commented 8 years ago

Note that we should add $_POST and $_GET to the DI container. So that we don't have to use any super-globals. (Makes for better tests).

mallorydxw commented 8 years ago

Closed in favour of #12