From e6205b7ee753e5cc39c321ba9db3381b98633788 Mon Sep 17 00:00:00 2001 From: PJ Dietz Date: Sun, 7 Jun 2015 13:32:39 -0400 Subject: [PATCH] Update docs for dependency injection --- docs/source/dependency-injection.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/dependency-injection.rst b/docs/source/dependency-injection.rst index 96ac3c8..a3530f5 100644 --- a/docs/source/dependency-injection.rst +++ b/docs/source/dependency-injection.rst @@ -1,7 +1,9 @@ Dependency Injection ==================== -Here are a few strategies for how to make a dependency injection container available to middleware with WellRESTed. +WellRESTed strives to play nicely with other code and not force developers into using any specific libraries or frameworks. As such, WellRESTed does not provide a dependency injection container, nor does it require you to use a specific container (or any). + +This section describes a handful of ways of making the dependency container of your choice available to middleware with WellRESTed. Request Attribute ^^^^^^^^^^^^^^^^^ @@ -17,7 +19,7 @@ When you instantiate a ``WellRESTed\Server``, you can provide an array of attrib $server = new WellRESTed\Server(["container" => $container]); // ... Add middleware, routes, etc. ... -When the server dispatches middleware, the middleware will be able to read the contain as the "container" attribute. +When the server dispatches middleware, the middleware will be able to read the container as the "container" attribute. .. code-block:: php