Last active
May 10, 2020 21:19
-
-
Save Swop/5990316 to your computer and use it in GitHub Desktop.
Annotation reader in Symfony
This file contains hidden or 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
<?php | |
namespace Foo\Annotations; | |
/** | |
*@Annotation | |
*/ | |
class AnnotatedDescription | |
{ | |
public $value; | |
public $type; | |
public $desc; | |
} |
This file contains hidden or 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
User Doctrine AnnotationReader to use custom annotations in a class. | |
(credits: Abu Ashraf Masnun - http://www.masnun.com/2012/08/12/using-annotations-in-php-with-doctrine-annotation-reader.html) |
This file contains hidden or 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
{ | |
"require": | |
{ | |
"doctrine/common": "*" | |
} | |
} |
This file contains hidden or 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
<?php | |
namespace Foo\Model; | |
use Foo\Annotations\AnnotatedDescription; | |