-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start introducing event system architecture * Finish implementing event system
- Loading branch information
Showing
26 changed files
with
976 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainer\Event; | ||
|
||
use Cspray\AnnotatedContainer\Attribute\ServicePrepare; | ||
use Cspray\AnnotatedContainer\Definition\ContainerDefinition; | ||
use Cspray\AnnotatedContainer\Definition\InjectDefinition; | ||
use Cspray\AnnotatedContainer\Definition\ServiceDefinition; | ||
use Cspray\AnnotatedContainer\Definition\ServiceDelegateDefinition; | ||
use Cspray\AnnotatedContainer\Definition\ServicePrepareDefinition; | ||
use Cspray\AnnotatedContainer\StaticAnalysis\ContainerDefinitionAnalysisOptions; | ||
use Cspray\AnnotatedTarget\AnnotatedTarget; | ||
|
||
interface AnalysisEmitter { | ||
|
||
public function emitBeforeContainerAnalysis(ContainerDefinitionAnalysisOptions $analysisOptions) : void; | ||
|
||
public function emitAnalyzedServiceDefinitionFromAttribute( | ||
AnnotatedTarget $annotatedTarget, | ||
ServiceDefinition $serviceDefinition, | ||
) : void; | ||
|
||
public function emitAnalyzedServicePrepareDefinitionFromAttribute( | ||
AnnotatedTarget $annotatedTarget, | ||
ServicePrepareDefinition $servicePrepareDefinition, | ||
) : void; | ||
|
||
public function emitAnalyzedServiceDelegateDefinitionFromAttribute( | ||
AnnotatedTarget $annotatedTarget, | ||
ServiceDelegateDefinition $serviceDelegateDefinition, | ||
) : void; | ||
|
||
public function emitAnalyzedInjectDefinitionFromAttribute( | ||
AnnotatedTarget $annotatedTarget, | ||
InjectDefinition $injectDefinition, | ||
) : void; | ||
|
||
public function emitAnalyzedContainerDefinitionFromCache( | ||
ContainerDefinition $definition, | ||
string $cacheFile | ||
) : void; | ||
|
||
public function emitAfterContainerAnalysis( | ||
ContainerDefinitionAnalysisOptions $analysisOptions, | ||
ContainerDefinition $containerDefinition, | ||
) : void; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainer\Event; | ||
|
||
use Cspray\AnnotatedContainer\AnnotatedContainer; | ||
use Cspray\AnnotatedContainer\Bootstrap\BootstrappingConfiguration; | ||
use Cspray\AnnotatedContainer\Bootstrap\ContainerAnalytics; | ||
use Cspray\AnnotatedContainer\Definition\ContainerDefinition; | ||
|
||
interface BootstrapEmitter { | ||
|
||
public function emitBeforeBootstrap(BootstrappingConfiguration $bootstrappingConfiguration) : void; | ||
|
||
public function emitAfterBootstrap( | ||
BootstrappingConfiguration $bootstrappingConfiguration, | ||
ContainerDefinition $containerDefinition, | ||
AnnotatedContainer $container, | ||
ContainerAnalytics $containerAnalytics, | ||
) : void; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainer\Event; | ||
|
||
use Cspray\AnnotatedContainer\AnnotatedContainer; | ||
use Cspray\AnnotatedContainer\ContainerFactory\AliasResolution\AliasResolutionReason; | ||
use Cspray\AnnotatedContainer\Definition\AliasDefinition; | ||
use Cspray\AnnotatedContainer\Definition\ContainerDefinition; | ||
use Cspray\AnnotatedContainer\Definition\InjectDefinition; | ||
use Cspray\AnnotatedContainer\Definition\ServiceDefinition; | ||
use Cspray\AnnotatedContainer\Definition\ServiceDelegateDefinition; | ||
use Cspray\AnnotatedContainer\Definition\ServicePrepareDefinition; | ||
use Cspray\AnnotatedContainer\Event\Listener\ServiceShared; | ||
use Cspray\AnnotatedContainer\Profiles; | ||
|
||
interface ContainerFactoryEmitter { | ||
|
||
public function emitBeforeContainerCreation(Profiles $profiles, ContainerDefinition $containerDefinition) : void; | ||
|
||
public function emitServiceFilteredDueToProfiles(Profiles $profiles, ServiceDefinition $serviceDefinition) : void; | ||
|
||
public function emitServiceShared(Profiles $profiles, ServiceDefinition $serviceDefinition) : void; | ||
|
||
public function emitInjectingMethodParameter(Profiles $profiles, InjectDefinition $injectDefinition) : void; | ||
|
||
public function emitInjectingProperty(Profiles $profiles, InjectDefinition $injectDefinition) : void; | ||
|
||
public function emitServicePrepared(Profiles $profiles, ServicePrepareDefinition $servicePrepareDefinition) : void; | ||
|
||
public function emitServiceDelegated(Profiles $profiles, ServiceDelegateDefinition $serviceDelegateDefinition) : void; | ||
|
||
public function emitServiceAliasResolution(Profiles $profiles, AliasDefinition $aliasDefinition, AliasResolutionReason $resolutionReason) : void; | ||
|
||
public function emitAfterContainerCreation(Profiles $profiles, ContainerDefinition $containerDefinition, AnnotatedContainer $container) : void; | ||
|
||
} |
Oops, something went wrong.