PHP 클래스 Zend\Diactoros\HeaderSecurity

Code is largely lifted from the Zend\Http\Header\HeaderValue implementation in Zend Framework, released with the copyright and license below.
파일 보기 프로젝트 열기: zendframework/zend-diactoros 1 사용 예제들

공개 메소드들

메소드 설명
assertValid ( string $value ) Assert a header value is valid.
assertValidName ( mixed $name ) Assert whether or not a header name is valid.
filter ( string $value ) : string Filter a header value
isValid ( string $value ) : boolean Validate a header value.

비공개 메소드들

메소드 설명
__construct ( ) Private constructor; non-instantiable.

메소드 상세

assertValid() 공개 정적인 메소드

Assert a header value is valid.
public static assertValid ( string $value )
$value string

assertValidName() 공개 정적인 메소드

Assert whether or not a header name is valid.
또한 보기: http://tools.ietf.org/html/rfc7230#section-3.2
public static assertValidName ( mixed $name )
$name mixed

filter() 공개 정적인 메소드

Ensures CRLF header injection vectors are filtered. Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal tabs are allowed in values; header continuations MUST consist of a single CRLF sequence followed by a space or horizontal tab. This method filters any values not allowed from the string, and is lossy.
또한 보기: http://en.wikipedia.org/wiki/HTTP_response_splitting
public static filter ( string $value ) : string
$value string
리턴 string

isValid() 공개 정적인 메소드

Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal tabs are allowed in values; header continuations MUST consist of a single CRLF sequence followed by a space or horizontal tab.
또한 보기: http://en.wikipedia.org/wiki/HTTP_response_splitting
public static isValid ( string $value ) : boolean
$value string
리턴 boolean