API Routers RouteAttributesParser - chsxf/mfx GitHub Wiki
RouteAttributesParser Class
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