PHP Класс Psr7Middlewares\Middleware

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__callStatic ( string $name, array $args ) Create instances of the middlewares.
create ( callable | string $basePath, callable $factory = null ) : callable Create a middleware callable that acts as a "proxy" to a real middleware that must be returned by the given callback.
getStreamFactory ( ) Set the stream factory used by some middlewares.
registerNamespace ( string $namespace ) Register a new namespace.
setStreamFactory ( callable $streamFactory ) Set the stream factory used by some middlewares.

Описание методов

__callStatic() публичный статический Метод

Create instances of the middlewares.
public static __callStatic ( string $name, array $args )
$name string
$args array

create() публичный статический Метод

Create a middleware callable that acts as a "proxy" to a real middleware that must be returned by the given callback.
public static create ( callable | string $basePath, callable $factory = null ) : callable
$basePath callable | string The base path in which the middleware is created (optional)
$factory callable Takes no argument and MUST return a middleware callable or false
Результат callable

getStreamFactory() публичный статический Метод

Set the stream factory used by some middlewares.
public static getStreamFactory ( )

registerNamespace() публичный статический Метод

Register a new namespace.
public static registerNamespace ( string $namespace )
$namespace string

setStreamFactory() публичный статический Метод

Set the stream factory used by some middlewares.
public static setStreamFactory ( callable $streamFactory )
$streamFactory callable