PHP 클래스 Webiny\Component\Rest\Parser\MethodParser

상속: use trait Webiny\Component\Annotations\AnnotationsTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $classes, ReflectionMethod $method, boolean $normalize ) Base constructor.
parse ( ) : ParsedMethod Parse the method and return an instance of ParsedMethod.

비공개 메소드들

메소드 설명
buildUrlPatternFromPattern ( string $pattern, array $parameters ) : string Builds the url pattern using the rest.url definition from method phpDoc.
buildUrlPatternStandard ( string $methodName, array $parameters ) : string Builds the url match pattern for each of the method inside the api.
getCache ( ConfigObject $annotations ) : array Extracts parameters regarding the cache form method annotations.
getDefault ( ConfigObject $annotations ) : boolean Checks if the method is flagged as "default".
getHeader ( ConfigObject $annotations ) : array Extracts http header information from method annotations.
getMethod ( ConfigObject $annotations ) : string Returns the name of the http method for accessing the api.
getRateControl ( ConfigObject $annotations ) : array Extracts the rate control information from the method annotations.
getRole ( ConfigObject $annotations ) : string | boolean If method has defined a access rule, this will return the name of the required role for accessing the method.

메소드 상세

__construct() 공개 메소드

Base constructor.
public __construct ( array $classes, ReflectionMethod $method, boolean $normalize )
$classes array API class tree.
$method ReflectionMethod Method that should be parsed.
$normalize boolean Should the class name and the method name be normalized.

parse() 공개 메소드

Parse the method and return an instance of ParsedMethod.
public parse ( ) : ParsedMethod
리턴 ParsedMethod