PHP 클래스 PhalconRest\Api\ApiEndpoint

파일 보기 프로젝트 열기: olivierandriessen/phalcon-rest 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$allowedRoles
$deniedRoles
$description
$exampleResponse
$handlerMethod
$httpMethod
$name
$path
$postedDataMethod

공개 메소드들

메소드 설명
__construct ( $path, $httpMethod = HttpMethods::GET, $handlerMethod = null )
all ( ) : static Returns pre-configured all endpoint
allow ( ) : static Allows access to this endpoint for role with the given names.
create ( ) : static Returns pre-configured create endpoint
delete ( $path, string $handlerMethod = null ) : ApiEndpoint Returns pre-configured DELETE endpoint
deny ( ) : static Denies access to this endpoint for role with the given names.
description ( string $description ) : static
exampleResponse ( string $exampleResponse )
expectsJsonData ( ) : static Sets the posted data method to JSON_BODY
expectsPostData ( ) : static Sets the posted data method to POST
factory ( string $path, string $httpMethod = HttpMethods::GET, string $handlerMethod = null ) : static Returns endpoint with default values
find ( ) : static Returns pre-configured find endpoint
get ( $path, string $handlerMethod = null ) : ApiEndpoint Returns pre-configured GET endpoint
getAllowedRoles ( ) : string[]
getDeniedRoles ( ) : string[]
getDescription ( ) : string
getExampleResponse ( ) : string
getHandlerMethod ( ) : string
getHttpMethod ( ) : string
getIdentifier ( ) : string
getName ( ) : string | null
getPath ( ) : string
getPostedDataMethod ( ) : string
handlerMethod ( string $handlerMethod ) : static
head ( $path, string $handlerMethod = null ) : ApiEndpoint Returns pre-configured HEAD endpoint
name ( string $name ) : static
options ( $path, string $handlerMethod = null ) : ApiEndpoint Returns pre-configured OPTIONS endpoint
patch ( $path, string $handlerMethod = null ) : ApiEndpoint Returns pre-configured PATCH endpoint
post ( $path, string $handlerMethod = null ) : ApiEndpoint Returns pre-configured POST endpoint
postedDataMethod ( string $method ) : static
put ( $path, string $handlerMethod = null ) : ApiEndpoint Returns pre-configured PUT endpoint
remove ( ) : static Returns pre-configured remove endpoint
update ( ) : static Returns pre-configured update endpoint

메소드 상세

__construct() 공개 메소드

public __construct ( $path, $httpMethod = HttpMethods::GET, $handlerMethod = null )

all() 공개 정적인 메소드

Returns pre-configured all endpoint
public static all ( ) : static
리턴 static

allow() 공개 메소드

Allows access to this endpoint for role with the given names.
public allow ( ) : static
리턴 static

create() 공개 정적인 메소드

Returns pre-configured create endpoint
public static create ( ) : static
리턴 static

delete() 공개 정적인 메소드

Returns pre-configured DELETE endpoint
public static delete ( $path, string $handlerMethod = null ) : ApiEndpoint
$path
$handlerMethod string
리턴 ApiEndpoint

deny() 공개 메소드

Denies access to this endpoint for role with the given names.
public deny ( ) : static
리턴 static

description() 공개 메소드

public description ( string $description ) : static
$description string Description for the endpoint
리턴 static

exampleResponse() 공개 메소드

public exampleResponse ( string $exampleResponse )
$exampleResponse string Example of the response of the endpoint

expectsJsonData() 공개 메소드

Sets the posted data method to JSON_BODY
public expectsJsonData ( ) : static
리턴 static

expectsPostData() 공개 메소드

Sets the posted data method to POST
public expectsPostData ( ) : static
리턴 static

factory() 공개 정적인 메소드

Returns endpoint with default values
public static factory ( string $path, string $httpMethod = HttpMethods::GET, string $handlerMethod = null ) : static
$path string
$httpMethod string
$handlerMethod string
리턴 static

find() 공개 정적인 메소드

Returns pre-configured find endpoint
public static find ( ) : static
리턴 static

get() 공개 정적인 메소드

Returns pre-configured GET endpoint
public static get ( $path, string $handlerMethod = null ) : ApiEndpoint
$path
$handlerMethod string
리턴 ApiEndpoint

getAllowedRoles() 공개 메소드

public getAllowedRoles ( ) : string[]
리턴 string[] Array of allowed role-names

getDeniedRoles() 공개 메소드

public getDeniedRoles ( ) : string[]
리턴 string[] Array of denied role-names

getDescription() 공개 메소드

public getDescription ( ) : string
리턴 string Description for the endpoint

getExampleResponse() 공개 메소드

public getExampleResponse ( ) : string
리턴 string Example of the response of the endpoint

getHandlerMethod() 공개 메소드

public getHandlerMethod ( ) : string
리턴 string Name of controller-method to be called for the endpoint

getHttpMethod() 공개 메소드

public getHttpMethod ( ) : string
리턴 string HTTP method of the endpoint

getIdentifier() 공개 메소드

public getIdentifier ( ) : string
리턴 string Unique identifier for this endpoint (returns a combination of the HTTP method and the path)

getName() 공개 메소드

public getName ( ) : string | null
리턴 string | null Name of the endpoint

getPath() 공개 메소드

public getPath ( ) : string
리턴 string Path of the endpoint, relative to the collection

getPostedDataMethod() 공개 메소드

public getPostedDataMethod ( ) : string
리턴 string $method One of the method constants defined in PostedDataMethods

handlerMethod() 공개 메소드

public handlerMethod ( string $handlerMethod ) : static
$handlerMethod string Name of controller-method to be called for the endpoint
리턴 static

head() 공개 정적인 메소드

Returns pre-configured HEAD endpoint
public static head ( $path, string $handlerMethod = null ) : ApiEndpoint
$path
$handlerMethod string
리턴 ApiEndpoint

name() 공개 메소드

public name ( string $name ) : static
$name string Name for the endpoint
리턴 static

options() 공개 정적인 메소드

Returns pre-configured OPTIONS endpoint
public static options ( $path, string $handlerMethod = null ) : ApiEndpoint
$path
$handlerMethod string
리턴 ApiEndpoint

patch() 공개 정적인 메소드

Returns pre-configured PATCH endpoint
public static patch ( $path, string $handlerMethod = null ) : ApiEndpoint
$path
$handlerMethod string
리턴 ApiEndpoint

post() 공개 정적인 메소드

Returns pre-configured POST endpoint
public static post ( $path, string $handlerMethod = null ) : ApiEndpoint
$path
$handlerMethod string
리턴 ApiEndpoint

postedDataMethod() 공개 메소드

public postedDataMethod ( string $method ) : static
$method string One of the method constants defined in PostedDataMethods
리턴 static

put() 공개 정적인 메소드

Returns pre-configured PUT endpoint
public static put ( $path, string $handlerMethod = null ) : ApiEndpoint
$path
$handlerMethod string
리턴 ApiEndpoint

remove() 공개 정적인 메소드

Returns pre-configured remove endpoint
public static remove ( ) : static
리턴 static

update() 공개 정적인 메소드

Returns pre-configured update endpoint
public static update ( ) : static
리턴 static

프로퍼티 상세

$allowedRoles 보호되어 있는 프로퍼티

protected $allowedRoles

$deniedRoles 보호되어 있는 프로퍼티

protected $deniedRoles

$description 보호되어 있는 프로퍼티

protected $description

$exampleResponse 보호되어 있는 프로퍼티

protected $exampleResponse

$handlerMethod 보호되어 있는 프로퍼티

protected $handlerMethod

$httpMethod 보호되어 있는 프로퍼티

protected $httpMethod

$name 보호되어 있는 프로퍼티

protected $name

$path 보호되어 있는 프로퍼티

protected $path

$postedDataMethod 보호되어 있는 프로퍼티

protected $postedDataMethod