Skip to content

class Athena::DependencyInjection::ServiceContainer
inherits Reference #

Where the instantiated services live.

If a service is public, a getter based on the service's name as well as its type is defined. Otherwise, services are only available via constructor DI.

TODO: Reduce the amount of duplication when this issue is resolved.

Direct known subclasses

Athena::DependencyInjection::Spec::MockableServiceContainer

Class methods#

.new #

Initializes the container. Auto registering annotated services.

View source

Methods#

#athena_routing_route_handler : Athena::Routing::RouteHandler #

#get(service : Athena::Routing::RequestStore.class) : Athena::Routing::RequestStore #

View source

#get(service : Athena::Routing::Router.class) : Athena::Routing::Router #

View source

#get(service : Athena::Routing::RouteHandler.class) : Athena::Routing::RouteHandler #

View source

#request_store : Athena::Routing::RequestStore #