PHP Класс Webiny\Component\Rest\Parser\ParsedMethod

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$cache Should the method result be cached by Rest component, and for how long. If ttl value is set to zero, the content will not be cached.
$default Is the current method a "default" method for the class and the http method type. Default methods are accessed by sending a request just to the class name, without the method name. Note that there can be several default methods, each for one http method type.
$header Header information.
$method Name if the http method for accessing this api method.
$name Name of the method.
$params A list of ParsedParameter instances.
$rateControl List of rate control parameters.
$resourceNaming Does the method use a resource naming url.
$role Name of the role the user must have in order to access the api method. Roles are defined in the Security component, or you can implement AccessInterface and define your own way of processing the access rules.
$urlPattern Url pattern, without the root path, defining the api location for this method.

Открытые методы

Метод Описание
__construct ( string $name ) Base constructor.
addParameter ( ParsedParameter $p ) Add a parameter for the method.
setUrlPattern ( string $urlPattern, boolean $resourceNaming )

Описание методов

__construct() публичный Метод

Base constructor.
public __construct ( string $name )
$name string Name of the api method.

addParameter() публичный Метод

Add a parameter for the method.
public addParameter ( ParsedParameter $p )
$p ParsedParameter

setUrlPattern() публичный Метод

public setUrlPattern ( string $urlPattern, boolean $resourceNaming )
$urlPattern string Url patten used to match the request with the method.
$resourceNaming boolean Does the method use a resource naming url.

Описание свойств

$cache публичное свойство

Should the method result be cached by Rest component, and for how long. If ttl value is set to zero, the content will not be cached.
public $cache

$default публичное свойство

Is the current method a "default" method for the class and the http method type. Default methods are accessed by sending a request just to the class name, without the method name. Note that there can be several default methods, each for one http method type.
public $default

$header публичное свойство

Header information.
public $header

$method публичное свойство

Name if the http method for accessing this api method.
public $method

$name публичное свойство

Name of the method.
public $name

$params публичное свойство

A list of ParsedParameter instances.
public $params

$rateControl публичное свойство

List of rate control parameters.
public $rateControl

$resourceNaming публичное свойство

Does the method use a resource naming url.
public $resourceNaming

$role публичное свойство

Name of the role the user must have in order to access the api method. Roles are defined in the Security component, or you can implement AccessInterface and define your own way of processing the access rules.
public $role

$urlPattern публичное свойство

Url pattern, without the root path, defining the api location for this method.
public $urlPattern