Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace Dynart\Micro;
4
5interface AttributeHandler {
6
7    const TARGET_CLASS    = 'class';
8    const TARGET_PROPERTY = 'property';
9    const TARGET_METHOD   = 'method';
10
11    /**
12     * Returns the attribute class name this handler processes
13     * @return string
14     */
15    public function attributeClass(): string;
16
17    /**
18     * Returns the targets this handler processes
19     *
20     * Can be: TARGET_CLASS, TARGET_PROPERTY, TARGET_METHOD
21     *
22     * @return array
23     */
24    public function targets(): array;
25
26    /**
27     * Handles an attribute found on a class, property or method
28     *
29     * @param string $className The name of the class
30     * @param \ReflectionClass|\ReflectionProperty|\ReflectionMethod $subject The reflected class, property or method
31     * @param object $attribute The attribute instance
32     */
33    public function handle(string $className, mixed $subject, object $attribute): void;
34}