PHP Class Flarum\Event\ConfigureApiController

Mostrar archivo Open project: flarum/core Class Usage Examples

Public Properties

Property Type Description
$controller Flarum\Api\Controller\AbstractSerializeController

Public Methods

Method Description
__construct ( AbstractSerializeController $controller )
addInclude ( string | array $name ) Include the given relationship by default.
addOptionalInclude ( string $name ) Make the given relationship available for inclusion.
addSortField ( string $field ) Allow sorting results by the given field.
isController ( string $controller ) : boolean
removeInclude ( string $name ) Don't include the given relationship by default.
removeOptionalInclude ( string $name ) Don't allow the given relationship to be included.
removeSortField ( string $field ) Disallow sorting results by the given field.
setLimit ( integer $limit ) Set the default number of results.
setMaxLimit ( integer $max ) Set the maximum number of results.
setSerializer ( string $serializer ) Set the serializer that will serialize data for the endpoint.
setSort ( array $sort ) Set the default sort order for the results.

Method Details

__construct() public method

public __construct ( AbstractSerializeController $controller )
$controller Flarum\Api\Controller\AbstractSerializeController

addInclude() public method

Include the given relationship by default.
public addInclude ( string | array $name )
$name string | array

addOptionalInclude() public method

Make the given relationship available for inclusion.
public addOptionalInclude ( string $name )
$name string

addSortField() public method

Allow sorting results by the given field.
public addSortField ( string $field )
$field string

isController() public method

public isController ( string $controller ) : boolean
$controller string
return boolean

removeInclude() public method

Don't include the given relationship by default.
public removeInclude ( string $name )
$name string

removeOptionalInclude() public method

Don't allow the given relationship to be included.
public removeOptionalInclude ( string $name )
$name string

removeSortField() public method

Disallow sorting results by the given field.
public removeSortField ( string $field )
$field string

setLimit() public method

Set the default number of results.
public setLimit ( integer $limit )
$limit integer

setMaxLimit() public method

Set the maximum number of results.
public setMaxLimit ( integer $max )
$max integer

setSerializer() public method

Set the serializer that will serialize data for the endpoint.
public setSerializer ( string $serializer )
$serializer string

setSort() public method

Set the default sort order for the results.
public setSort ( array $sort )
$sort array

Property Details

$controller public_oe property

public AbstractSerializeController,Flarum\Api\Controller $controller
return Flarum\Api\Controller\AbstractSerializeController