PHP 클래스 PhalconRest\Api\ApiCollection

상속: extends Phalcon\Mvc\Micro\Collection, implements PhalconApi\Acl\MountableInterface, implements Phalcon\Mvc\Micro\CollectionInterface
파일 보기 프로젝트 열기: olivierandriessen/phalcon-rest 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$allowedRoles
$deniedRoles
$description
$endpointsByName
$name
$postedDataMethod

공개 메소드들

메소드 설명
__construct ( $prefix )
allow ( ) : static Allows access to this collection for role with the given names. This can be overwritten on the Endpoint level.
deny ( ) * Denies access to this collection for role with the given names. This can be overwritten on the Endpoint level.
description ( string $description ) : static
endpoint ( ApiEndpoint $endpoint ) : static Mounts endpoint to the collection
expectsJsonData ( ) : static Sets the posted data method to JSON_BODY
expectsPostData ( ) : static Sets the posted data method to POST
factory ( string $prefix, string $name = null ) : static Returns collection with default values
getAclResources ( )
getAclRules ( array $roles )
getAllowedRoles ( ) : string[]
getDeniedRoles ( ) : string[]
getDescription ( ) : string
getEndpoint ( string $name ) : ApiEndpoint | null
getEndpoints ( ) : ApiEndpoint[]
getIdentifier ( ) : string
getName ( ) : string | null
getPostedDataMethod ( ) : string
handler ( $handler, $lazy = true )
mount ( ApiEndpoint $endpoint ) : static Mounts endpoint to the collection
name ( string $name ) : static
postedDataMethod ( string $method ) : static
setPrefix ( $prefix )

보호된 메소드들

메소드 설명
createRouteName ( ApiEndpoint $endpoint )
initialize ( ) Use this method when you extend this class in order to define the collection

메소드 상세

__construct() 공개 메소드

public __construct ( $prefix )

allow() 공개 메소드

Allows access to this collection for role with the given names. This can be overwritten on the Endpoint level.
public allow ( ) : static
리턴 static

createRouteName() 보호된 메소드

protected createRouteName ( ApiEndpoint $endpoint )
$endpoint ApiEndpoint

deny() 공개 메소드

* Denies access to this collection for role with the given names. This can be overwritten on the Endpoint level.
public deny ( )

description() 공개 메소드

public description ( string $description ) : static
$description string Description of the collection
리턴 static

endpoint() 공개 메소드

Mounts endpoint to the collection
public endpoint ( ApiEndpoint $endpoint ) : static
$endpoint ApiEndpoint Endpoint to mount
리턴 static

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 collection with default values
public static factory ( string $prefix, string $name = null ) : static
$prefix string Prefix for the collection (e.g. /auth)
$name string Name for the collection (e.g. authentication) (optional)
리턴 static

getAclResources() 공개 메소드

public getAclResources ( )

getAclRules() 공개 메소드

public getAclRules ( array $roles )
$roles array

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 of the collection

getEndpoint() 공개 메소드

public getEndpoint ( string $name ) : ApiEndpoint | null
$name string Name for the endpoint to return
리턴 ApiEndpoint | null Endpoint with the given name

getEndpoints() 공개 메소드

public getEndpoints ( ) : ApiEndpoint[]
리턴 ApiEndpoint[] Array of all mounted endpoints

getIdentifier() 공개 메소드

public getIdentifier ( ) : string
리턴 string Unique identifier for this collection (returns the prefix)

getName() 공개 메소드

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

getPostedDataMethod() 공개 메소드

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

handler() 공개 메소드

public handler ( $handler, $lazy = true )

initialize() 보호된 메소드

Use this method when you extend this class in order to define the collection
protected initialize ( )

mount() 공개 메소드

Mounts endpoint to the collection
public mount ( ApiEndpoint $endpoint ) : static
$endpoint ApiEndpoint Endpoint to mount (shortcut for endpoint function)
리턴 static

name() 공개 메소드

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

postedDataMethod() 공개 메소드

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

setPrefix() 공개 메소드

public setPrefix ( $prefix )

프로퍼티 상세

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

protected $allowedRoles

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

protected $deniedRoles

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

protected $description

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

protected $endpointsByName

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

protected $name

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

protected $postedDataMethod