Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 2 KB

docs.md

File metadata and controls

43 lines (28 loc) · 2 KB

Table of contents


Class: Rudra\Annotation\Annotation

Visibility Function
public getAnnotations(string $className, ?string $methodName): array
Each parameter must be on its own line.
public getAttributes(string $className, ?string $methodName): array
Returns all attributes for a class or method.
Returns short class names (e.g. Cache, not App\Attributes\Cache).
private extractShortClassName(string $fullyQualifiedName): string
private getReflection(string $className, ?string $methodName): ReflectionClass|ReflectionMethod
private parseAnnotations(string $docBlock): array

Class: Rudra\Annotation\AnnotationInterface

Visibility Function
abstract public getAnnotations(string $className, ?string $methodName): array
abstract public getAttributes(string $className, ?string $methodName): array

Class: Rudra\Annotation\ParamsExtractor

Visibility Function
public getParams(array $exploded, string $assignment): array
Parses an array of parameter strings into an associative array
from: "param1, param2 = 'param2', param3={param1;param2:'param2'}"
to: ["param1", "param2" => "param2", "param3" => ["param1", "param2" => "param2"]]
private handleData(string $data, array $exploded): ?array
Parses data into key => value pairs
⚠️ IMPORTANT: Values inside arrays (curly braces)
must not contain the array assignment mark (:)