Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
TransformerAnnotation.php
Go to the documentation of this file.
1
<?php
2
namespace
Ubiquity\annotations\items
;
3
15
class
TransformerAnnotation
extends
BaseAnnotation
{
16
17
public
$name
;
18
22
public
function
initAnnotation
(array $properties) {
23
if
(isset($properties[0])) {
24
$this->name = $properties[0];
25
unset($properties[0]);
26
}
else
if
(isset($properties[
'name'
])) {
27
$this->name = $properties[
'name'
];
28
}
else
{
29
throw
new \Exception(
'Transformer annotation must have a name'
);
30
}
31
}
32
33
public
function
isSameAs
($annot): bool {
34
return \get_class($annot) ===
TransformerAnnotation
::class && $this->name == $annot->name;
35
}
36
}
Ubiquity\annotations\items\BaseAnnotation
Base class for annotations.
Definition
BaseAnnotation.php:13
Ubiquity\annotations\items\TransformerAnnotation
Annotation Transformer.
Definition
TransformerAnnotation.php:15
Ubiquity\annotations\items\TransformerAnnotation\initAnnotation
initAnnotation(array $properties)
Initialize the annotation.
Definition
TransformerAnnotation.php:22
Ubiquity\annotations\items\TransformerAnnotation\isSameAs
isSameAs($annot)
Definition
TransformerAnnotation.php:33
Ubiquity\annotations\items\TransformerAnnotation\$name
$name
Definition
TransformerAnnotation.php:17
Ubiquity\annotations\items
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity-annotations
src
Ubiquity
annotations
items
TransformerAnnotation.php
Generated on Sun Dec 10 2023 15:04:04 for
Ubiquity
by
doxygen
1.9.8