| Total Complexity | 7 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | class CallbackAnnotation extends AbstractAnnotation |
||
| 30 | { |
||
| 31 | /** |
||
| 32 | * The javascript object name |
||
| 33 | * |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | protected $sJsObject; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @inheritDoc |
||
| 40 | */ |
||
| 41 | public static function parseAnnotation($value) |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @inheritDoc |
||
| 49 | * @throws AnnotationException |
||
| 50 | */ |
||
| 51 | public function initAnnotation(array $properties) |
||
| 52 | { |
||
| 53 | if(count($properties) !== 1 || !isset($properties['name']) || !is_string($properties['name'])) |
||
| 54 | { |
||
| 55 | throw new AnnotationException('the @callback annotation requires a single string as property'); |
||
| 56 | } |
||
| 57 | $this->sJsObject = $properties['name']; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @inheritDoc |
||
| 62 | */ |
||
| 63 | public function saveValue(Metadata $xMetadata, string $sMethod = '*'): void |
||
| 66 | } |
||
| 67 | } |
||
| 68 |