PHP 클래스 Psr7Middlewares\Middleware

파일 보기 프로젝트 열기: oscarotero/psr7-middlewares 1 사용 예제들

공개 메소드들

메소드 설명
__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