|
static | from (array|string|object $reference, ?string $attributename=null, int $attributeflags=ReflectionAttribute::IS_INSTANCEOF,) |
| Get the attribute from a reference.
|
|
static | instance (array|string|object $reference, ?string $attributename=null, int $attributeflags=ReflectionAttribute::IS_INSTANCEOF,) |
| Get an instance of an attribute from a reference.
|
|
static | instances (array|string|object $reference, ?string $attributename=null, int $attributeflags=ReflectionAttribute::IS_INSTANCEOF,) |
| Get all instance of an attribute from a reference.
|
|
static | one_from (array|string|object $reference, ?string $attributename=null, int $attributeflags=ReflectionAttribute::IS_INSTANCEOF,) |
| Get one attribute from a reference.
|
|
|
static | from_reflected_object (ReflectionClass $rc, ?string $referenceproperty, ?string $attributename=null, int $flags=0,) |
| Fetch an attribute from a reflected object.
|
|
◆ from()
static core\attribute_helper::from |
( |
array|string|object | $reference, |
|
|
?string | $attributename = null, |
|
|
int | $attributeflags = ReflectionAttribute::IS_INSTANCEOF ) |
|
static |
Get the attribute from a reference.
The reference can be:
- a string, in which case it will be checked for a function, class, method, property, constant, or enum.
- an array
- an instantiated object, in which case the object will be checked for a class, method, property, or constant.
- Parameters
-
array | string | object | $reference | A reference of where to find the attribute |
null | string | $attributename | The name of the attribute to find |
int | $attributeflags | The flags to use when finding the attribute |
- Return values
-
ReflectionAttribute[]|null | |
◆ from_reflected_object()
static core\attribute_helper::from_reflected_object |
( |
ReflectionClass | $rc, |
|
|
?string | $referenceproperty, |
|
|
?string | $attributename = null, |
|
|
int | $flags = 0 ) |
|
staticprotected |
Fetch an attribute from a reflected object.
- Parameters
-
ReflectionClass | $rc | The reflected object |
null | string | $referenceproperty | The name of the thing to find attributes on |
null | string | $attributename | The name of the attribute to find |
int | $attributeflags | The flags to use when finding the attribute |
- Return values
-
ReflectionAttribute[]|null | |
◆ instance()
static core\attribute_helper::instance |
( |
array|string|object | $reference, |
|
|
?string | $attributename = null, |
|
|
int | $attributeflags = ReflectionAttribute::IS_INSTANCEOF ) |
|
static |
Get an instance of an attribute from a reference.
The reference can be:
- a string, in which case it will be checked for a function, class, method, property, constant, or enum.
- an array
- an instantiated object, in which case the object will be checked for a class, method, property, or constant.
- Parameters
-
array | string | object | $reference | A reference of where to find the attribute |
null | string | $attributename | The name of the attribute to find |
int | $attributeflags | The flags to use when finding the attribute |
- Return values
-
◆ instances()
static core\attribute_helper::instances |
( |
array|string|object | $reference, |
|
|
?string | $attributename = null, |
|
|
int | $attributeflags = ReflectionAttribute::IS_INSTANCEOF ) |
|
static |
Get all instance of an attribute from a reference.
The reference can be:
- a string, in which case it will be checked for a function, class, method, property, constant, or enum.
- an array
- an instantiated object, in which case the object will be checked for a class, method, property, or constant.
- Parameters
-
array | string | object | $reference | A reference of where to find the attribute |
null | string | $attributename | The name of the attribute to find |
int | $attributeflags | The flags to use when finding the attribute |
- Return values
-
◆ one_from()
static core\attribute_helper::one_from |
( |
array|string|object | $reference, |
|
|
?string | $attributename = null, |
|
|
int | $attributeflags = ReflectionAttribute::IS_INSTANCEOF ) |
|
static |
Get one attribute from a reference.
The reference can be:
- a string, in which case it will be checked for a function, class, method, property, constant, or enum.
- an array
- an instantiated object, in which case the object will be checked for a class, method, property, or constant.
- Parameters
-
array | string | object | $reference | A reference of where to find the attribute |
null | string | $attributename | The name of the attribute to find |
int | $attributeflags | The flags to use when finding the attribute |
- Return values
-
The documentation for this class was generated from the following file:
- lib/classes/attribute_helper.php