| @@ 66-79 (lines=14) @@ | ||
| 63 | * @param string $className |
|
| 64 | * @return array[] |
|
| 65 | */ |
|
| 66 | public function methodsMeta(string $className) : array |
|
| 67 | { |
|
| 68 | if(!isset($this->cache[$className][__METHOD__])) { |
|
| 69 | $this->cache[$className][__METHOD__] = []; |
|
| 70 | $classReflector = new \ReflectionClass($className); |
|
| 71 | foreach($classReflector->getMethods(\ReflectionMethod::IS_PUBLIC) as $line) { |
|
| 72 | if(!$line->isStatic()) { |
|
| 73 | $doc = $line->getDocComment(); |
|
| 74 | $this->cache[$className][__METHOD__][$line->name] = StrHelper::parseDocComment($doc); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | } |
|
| 78 | return $this->cache[$className][__METHOD__]; |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * Metadata for fields |
|
| @@ 88-101 (lines=14) @@ | ||
| 85 | * @param string $className |
|
| 86 | * @return array |
|
| 87 | */ |
|
| 88 | public function fieldsMeta(string $className) : array |
|
| 89 | { |
|
| 90 | if(!isset($this->cache[$className][__METHOD__])) { |
|
| 91 | $this->cache[$className][__METHOD__] = []; |
|
| 92 | $classReflector = new \ReflectionClass($className); |
|
| 93 | foreach($classReflector->getProperties(\ReflectionProperty::IS_PUBLIC) as $line) { |
|
| 94 | if(!$line->isStatic()) { |
|
| 95 | $doc = $line->getDocComment(); |
|
| 96 | $this->cache[$className][__METHOD__][$line->name] = StrHelper::parseDocComment($doc); |
|
| 97 | } |
|
| 98 | } |
|
| 99 | } |
|
| 100 | return $this->cache[$className][__METHOD__]; |
|
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * @param array $data |
|