Conditions | 2 |
Paths | 2 |
Total Lines | 28 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | final public static function getAnnotation($object) |
||
25 | { |
||
26 | $funReflec = new FuncoesReflections(); |
||
27 | |||
28 | $output = array(); |
||
29 | |||
30 | $pattern = '/@+_+[A-z]\w+=\w+/'; |
||
31 | |||
32 | $fullComments = $funReflec->retornaComentariosAtributos($object); |
||
33 | $attribuites = $funReflec->pegaAtributosDoObjeto($object); |
||
34 | |||
35 | $annotationsList = []; |
||
36 | |||
37 | $limit = count($attribuites); |
||
38 | $iterator = 0; |
||
39 | for ($iterator; $iterator < $limit; $iterator++) { |
||
40 | |||
41 | preg_match_all( |
||
42 | $pattern, |
||
43 | $fullComments[$attribuites[$iterator]], |
||
44 | $output |
||
45 | ); |
||
46 | |||
47 | $annotationsList[ $attribuites[$iterator] ] = $output[0]; |
||
48 | } |
||
49 | |||
50 | return $annotationsList; |
||
51 | } |
||
52 | } |
||
53 |