AttributeResolver

Resolves attributes from a class.

  • Full name: \CEKW\WpPlugin\AttributeResolver
Table of contents
  1. Properties
  2. Methods
    1. __construct
    2. fromMethod

Properties

Name Type Description
attributeClassName string Class name of the attribute to check against.
reflectionClass \ReflectionClass Reflection of the class to resolve attributes from.

Methods

__construct

AttributeResolver::__construct(string attributeClassName, \ReflectionClass reflectionClass)

Parameters:

Parameter Type Description
attributeClassName string  
reflectionClass \ReflectionClass  

fromMethod

Resolves attributes from a method and provides a callback for each attribute.

AttributeResolver::fromMethod(callable callback, int flags): mixed

Parameters:

Parameter Type Description
callback callable  
flags int Use ReflectionAttribute::IS_INSTANCEOF if you want to test against an interfac.

Returns: mixed