MediaWiki  master
MediaWiki\Rest\BasicAccess\CompoundAuthorizer Class Reference
Inheritance diagram for MediaWiki\Rest\BasicAccess\CompoundAuthorizer:
Collaboration diagram for MediaWiki\Rest\BasicAccess\CompoundAuthorizer:

Public Member Functions

 __construct (array $authorizers=[])
 
 addAuthorizer (BasicAuthorizerInterface $authorizer)
 Adds a BasicAuthorizerInterface to the chain of authorizers. More...
 
 authorize (RequestInterface $request, Handler $handler)
 Checks all registered authorizers and returns the first encountered error. More...
 

Private Attributes

BasicAuthorizerInterface[] $authorizers
 

Detailed Description

Definition at line 14 of file CompoundAuthorizer.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\BasicAccess\CompoundAuthorizer::__construct ( array  $authorizers = [])
Parameters
array$authorizers

Definition at line 22 of file CompoundAuthorizer.php.

References MediaWiki\Rest\BasicAccess\CompoundAuthorizer\$authorizers.

Member Function Documentation

◆ addAuthorizer()

MediaWiki\Rest\BasicAccess\CompoundAuthorizer::addAuthorizer ( BasicAuthorizerInterface  $authorizer)

Adds a BasicAuthorizerInterface to the chain of authorizers.

Parameters
BasicAuthorizerInterface$authorizer
Returns
CompoundAuthorizer

Definition at line 31 of file CompoundAuthorizer.php.

◆ authorize()

MediaWiki\Rest\BasicAccess\CompoundAuthorizer::authorize ( RequestInterface  $request,
Handler  $handler 
)

Checks all registered authorizers and returns the first encountered error.

Parameters
RequestInterface$request
Handler$handler
Returns
string|null

Implements MediaWiki\Rest\BasicAccess\BasicAuthorizerInterface.

Definition at line 42 of file CompoundAuthorizer.php.

Member Data Documentation

◆ $authorizers

BasicAuthorizerInterface [] MediaWiki\Rest\BasicAccess\CompoundAuthorizer::$authorizers
private

The documentation for this class was generated from the following file: