Skip to content

API Routers RouteAttributesParser

Christophe SAUVEUR edited this page Nov 23, 2024 · 2 revisions

RouteAttributesParser Class

chsxf\MFX\Routers

class RouteAttributesParser

Summary

Since 1.0

Methods

__construct

public function __construct(ReflectionClass|ReflectionMethod $reflectedElement)

Since 1.0

Parameters

Name Type Description
$reflectedElement `ReflectionClass ReflectionMethod`

getAttributeValue

public function getAttributeValue(string $class, ?string $defaultValue = null): ?string

Since 1.0

Parameters

Name Type Description
$class string
$defaultValue `null string`

Returns

null|string

Throws

Exception Reason
DataValidatorException

hasAttribute

public function hasAttribute(string $class)

Since 1.0

Parameters

Name Type Description
$class string

Returns

bool


hasAttributeWithValue

public function hasAttributeWithValue(string $class, string $value): bool

Since 1.0

Parameters

Name Type Description
$class string
$value string

Returns

bool


Clone this wiki locally