-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add find-and-register functionality to the processor factory
- Loading branch information
Showing
5 changed files
with
83 additions
and
1 deletion.
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,19 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Kcs\Metadata\Loader\Processor\Annotation; | ||
|
||
use Doctrine\Common\Annotations\Annotation\Required; | ||
|
||
/** | ||
* @Annotation() | ||
* @Target({"CLASS"}) | ||
*/ | ||
class Processor | ||
{ | ||
/** | ||
* @var string | ||
* | ||
* @Required() | ||
*/ | ||
public $annotation; | ||
} |
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
18 changes: 18 additions & 0 deletions
18
tests/Fixtures/AnnotationProcessorLoader/Processor/ClassAnnotProcessor.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,18 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Kcs\Metadata\Tests\Fixtures\AnnotationProcessorLoader\Processor; | ||
|
||
use Kcs\Metadata\Loader\Processor\Annotation\Processor; | ||
use Kcs\Metadata\Loader\Processor\ProcessorInterface; | ||
use Kcs\Metadata\MetadataInterface; | ||
use Kcs\Metadata\Tests\Fixtures\AnnotationProcessorLoader\Annotation\ClassAnnot; | ||
|
||
/** | ||
* @Processor(annotation=ClassAnnot::class) | ||
*/ | ||
class ClassAnnotProcessor implements ProcessorInterface | ||
{ | ||
public function process(MetadataInterface $metadata, $subject): 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