# HG changeset patch # User cin # Date 1440780893 -10800 # Node ID 9ef75f2029be41832e24fe2bd18ca21842996171 # Parent 7171a8e2e2ba51a638c9934af1954d9ddeaec030 sync diff -r 7171a8e2e2ba -r 9ef75f2029be Lib/IMPL/Config/ActivationContext.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/IMPL/Config/ActivationContext.pm Fri Aug 28 19:54:53 2015 +0300 @@ -0,0 +1,22 @@ +package IMPL::Config::ActivationContext; + +1; +__END__ + +=pod + +=head1 NAME + +C - an activation context for the service + +=head1 SYNOPSIS + +For the internal use only + +=head1 MEMBERS + +=head2 METHODS + +=head3 GetService($serviceId) + +=cut \ No newline at end of file diff -r 7171a8e2e2ba -r 9ef75f2029be Lib/IMPL/Config/Container.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/IMPL/Config/Container.pm Fri Aug 28 19:54:53 2015 +0300 @@ -0,0 +1,34 @@ +package IMPL::Config::Container; + +1; + +__END__ + +=pod + +=head1 NAME + +C - dependency injection container + +=head1 SYNOPSIS + +=head2 METHODS + +=head3 GetService($serviceId) + +=over + +=item * $serviceId + +A string indetifier of the service, it can be in two forms: class name or service name, +for the class name it should be prefixed with C<@>, for example: C<@Foo::Bar>. + +=back + +The activation container maintains two maps, one for classes and the other for names. +The first one is useful when we searching for an implementation the second one when +we need a particular service. + +=head3 RegisterService($descriptor) + +=cut \ No newline at end of file diff -r 7171a8e2e2ba -r 9ef75f2029be Lib/IMPL/Config/Descriptor.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/IMPL/Config/Descriptor.pm Fri Aug 28 19:54:53 2015 +0300 @@ -0,0 +1,51 @@ +package IMPL::Config::Descriptor; + + + +1; + +__END__ + +=pod + +=head1 NAME + +C - the abstract base types for the service descriptors + +=head1 SYNOPSIS + +=begin code + +package MyDescriptor; + +use IMPL::declare { + base => { + 'IMPL::Config::Descriptor' => '@_' + } +}; + +sub Activate { + my ($this,$context) = @_; + + my $service = $context->GetService('service'); + my + +} + +=end code + +=head1 MEMBERS + +=head1 SEE ALSO + +=over + +=item * L - describes a reference to the service + +=item * L - descibes a service factory + +=item * L - describes a value + +=back + +=cut \ No newline at end of file diff -r 7171a8e2e2ba -r 9ef75f2029be Lib/IMPL/Config/ReferenceDescriptor.pm diff -r 7171a8e2e2ba -r 9ef75f2029be Lib/IMPL/Config/ServiceDescriptor.pm diff -r 7171a8e2e2ba -r 9ef75f2029be Lib/IMPL/Config/ValueDescriptor.pm