MediaWiki master
StaticBasicAuthorizer.php
Go to the documentation of this file.
1<?php
2
4
7
14 private $value;
15
23 public function __construct( $value = null ) {
24 $this->value = $value;
25 }
26
27 public function authorize( RequestInterface $request, Handler $handler ) {
28 return $this->value;
29 }
30}
An authorizer which returns a value from authorize() which is given in the constructor.
authorize(RequestInterface $request, Handler $handler)
Determine whether a request should be permitted, given the handler's needsReadAccess() and needsWrite...
Base class for REST route handlers.
Definition Handler.php:21
An interface used by Router to ensure that the client has "basic" access, i.e.
A request interface similar to PSR-7's ServerRequestInterface.
Copyright (C) 2011-2020 Wikimedia Foundation and others.