rfc:annotations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:annotations [2011/05/09 23:19] – Brought RFC up to date. guilhermeblanco | rfc:annotations [2011/05/10 03:19] – pierrick | ||
---|---|---|---|
Line 108: | Line 108: | ||
Annotations can be defined on classes, methods, properties, functions or function parameters. | Annotations can be defined on classes, methods, properties, functions or function parameters. | ||
- | ReflectionAnnotation is an interface | + | ReflectionAnnotation is an interface |
- | Once this class is extended, the subclass is ready to be used an an Annotation: | + | Once this class is extended, the subclass is ready to be used as an Annotation: |
<code php> | <code php> | ||
Line 144: | Line 144: | ||
public $target; | public $target; | ||
| | ||
- | public function __construct($url, | + | public function __construct($url, |
{ | { | ||
$this-> | $this-> | ||
Line 153: | Line 153: | ||
namespace App; | namespace App; | ||
- | < | + | < |
class PHPWebsite { | class PHPWebsite { | ||
// ... | // ... | ||
Line 232: | Line 232: | ||
</ | </ | ||
- | Please notice that multiple instantiation of same Annotation is left intentionally for discussion. It can be supported. | + | Please notice that multiple instantiation of same Annotation is left intentionally for discussion. It could be supported. |
Also, the inheritance of Annotations is left for discussion too. This can be done by 2 different approaches: | Also, the inheritance of Annotations is left for discussion too. This can be done by 2 different approaches: | ||
Line 298: | Line 298: | ||
* Possible usage of " | * Possible usage of " | ||
* Tokens for start/end. Currently it's "<" | * Tokens for start/end. Currently it's "<" | ||
+ | * Nested Annotation declaration: | ||
* Multiple instantiations of Annotation classes on a same block. | * Multiple instantiations of Annotation classes on a same block. | ||
* Inheritance of classes/ | * Inheritance of classes/ | ||
Line 303: | Line 304: | ||
===== Patch ===== | ===== Patch ===== | ||
- | Ongoing. | + | Patch : [[http:// |
+ | |||
+ | Tests : [[http:// | ||
===== Changelog ===== | ===== Changelog ===== |
rfc/annotations.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1