owncloud/core — pull request #12613 by butonic (2014-12-04 11:36:52+00:00)
Title: allow apps to execute code after a service has been registered

I quickly wanted to answer https://github.com/owncloud/templateeditor/issues/12 But stumbled over the unpredictable order in which apps are initialized. So I created this simple observer mechanism that allows apps to register closures to be executed after a service has been registered.

An example is the template app, that can register itself with the server to allow other apps to register additional templates. See the above mentioned issue.

While we can use st like `\OC::$server->getSearch()->registerProvider(...)` for apps that are part of core, this allows interaction between apps ... without core needing to know about them up front.

- [ ] we might need to add `registerService()` to the `IServerContainer` interface.