-
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.
Improve functions API to allow emitting events (#356)
- Loading branch information
Showing
22 changed files
with
478 additions
and
34 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
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,7 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainerFixture\ThirdPartyKitchenSink; | ||
|
||
interface NonAnnotatedInterface { | ||
|
||
} |
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,25 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainerFixture\ThirdPartyKitchenSink; | ||
|
||
class NonAnnotatedService implements NonAnnotatedInterface { | ||
|
||
private bool $initCalled = false; | ||
|
||
private function __construct( | ||
public readonly string $value | ||
) {} | ||
|
||
public function init() { | ||
$this->initCalled = true; | ||
} | ||
|
||
public static function create(string $value) : self { | ||
return new self($value); | ||
} | ||
|
||
public function isInitCalled() : bool { | ||
return $this->initCalled; | ||
} | ||
|
||
} |
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,18 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainerFixture; | ||
|
||
use Cspray\AnnotatedContainerFixture\ThirdPartyKitchenSink\NonAnnotatedService; | ||
use Cspray\Typiphy\ObjectType; | ||
|
||
class ThirdPartyKitchenSinkFixture implements Fixture { | ||
|
||
public function getPath() : string { | ||
return __DIR__ . '/ThirdPartyKitchenSink'; | ||
} | ||
|
||
public function nonAnnotatedService() : ObjectType { | ||
return objectType(NonAnnotatedService::class); | ||
} | ||
|
||
} |
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
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
11 changes: 11 additions & 0 deletions
11
src/Event/Listener/StaticAnalysis/AddedInjectDefinitionFromApi.php
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,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainer\Event\Listener\StaticAnalysis; | ||
|
||
use Cspray\AnnotatedContainer\Definition\InjectDefinition; | ||
|
||
interface AddedInjectDefinitionFromApi { | ||
|
||
public function handleAddedInjectDefinitionFromApi(InjectDefinition $injectDefinition) : void; | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/Event/Listener/StaticAnalysis/AddedServiceDefinitionFromApi.php
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,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainer\Event\Listener\StaticAnalysis; | ||
|
||
use Cspray\AnnotatedContainer\Definition\ServiceDefinition; | ||
|
||
interface AddedServiceDefinitionFromApi { | ||
|
||
public function handleAddedServiceDefinitionFromApi(ServiceDefinition $serviceDefinition) : void; | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/Event/Listener/StaticAnalysis/AddedServiceDelegateDefinitionFromApi.php
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,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainer\Event\Listener\StaticAnalysis; | ||
|
||
use Cspray\AnnotatedContainer\Definition\ServiceDelegateDefinition; | ||
|
||
interface AddedServiceDelegateDefinitionFromApi { | ||
|
||
public function handleAddedServiceDelegateDefinitionFromApi(ServiceDelegateDefinition $serviceDelegateDefinition) : void; | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/Event/Listener/StaticAnalysis/AddedServicePrepareDefinitionFromApi.php
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,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Cspray\AnnotatedContainer\Event\Listener\StaticAnalysis; | ||
|
||
use Cspray\AnnotatedContainer\Definition\ServicePrepareDefinition; | ||
|
||
interface AddedServicePrepareDefinitionFromApi { | ||
|
||
public function handleAddedServicePrepareDefinitionFromApi(ServicePrepareDefinition $servicePrepareDefinition) : 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
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
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
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
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
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
Oops, something went wrong.