PHP 클래스 Nabble\SemaltBlocker\Blocker

파일 보기 프로젝트 열기: nabble/semalt-blocker 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$explanation

공개 메소드들

메소드 설명
blocked ( $verbose = false )
blocked ( boolean $verbose = false ) : boolean | string
explain ( )
explain ( ) : string
forbidden ( ) Send a 403 Forbidden header.
getBlocklist ( )
getBlocklist ( ) : array
getBlocklistFilename ( )
getBlocklistFilename ( ) : string
isRefererOnBlocklist ( )
isRefererOnBlocklist ( ) : boolean The public use of this function is undocumented.
isUrlOnBlocklist ( $url, $entity = 'url' )
isUrlOnBlocklist ( string $url, string $entity = 'url' ) : boolean The public use of this function is undocumented.
protect ( $action = '' )
protect ( string $action = '' ) Block a page if referer is found on list of blocked domains.

비공개 메소드들

메소드 설명
blockAction ( $action = '' )
blockAction ( string $action = '' ) Execute desired action.
cls ( ) Clear output buffer.
concatenateBlocklist ( $blocklistContent )
concatenateBlocklist ( string $blocklistContent ) : string
doBlock ( $action = '' )
doBlock ( string $action = '' ) Responsible for sending action output.
getBlocklistContents ( )
getBlocklistContents ( ) : string
getConcatenateBlocklist ( )
getConcatenateBlocklist ( ) : string
getHttpReferer ( )
getHttpReferer ( ) : string | null Returns HTTP Referer if it is available and not empty, null otherwise.
parseBlocklist ( $blocklistContent )
parseBlocklist ( string $blocklistContent ) : array
redirect ( $url )
redirect ( string $url ) Redirect to a url by sending the appropriate header.

메소드 상세

blocked() 공개 정적인 메소드

public static blocked ( $verbose = false )

blocked() 공개 정적인 메소드

public static blocked ( boolean $verbose = false ) : boolean | string
$verbose boolean Deprecated. Please use the explain() method instead.
리턴 boolean | string

explain() 공개 정적인 메소드

public static explain ( )

explain() 공개 정적인 메소드

public static explain ( ) : string
리턴 string

forbidden() 공개 정적인 메소드

Send a 403 Forbidden header.
public static forbidden ( )

getBlocklist() 공개 정적인 메소드

public static getBlocklist ( )

getBlocklist() 공개 정적인 메소드

public static getBlocklist ( ) : array
리턴 array

getBlocklistFilename() 공개 정적인 메소드

public static getBlocklistFilename ( )

getBlocklistFilename() 공개 정적인 메소드

public static getBlocklistFilename ( ) : string
리턴 string

isRefererOnBlocklist() 공개 정적인 메소드

public static isRefererOnBlocklist ( )

isRefererOnBlocklist() 공개 정적인 메소드

The public use of this function is undocumented.
public static isRefererOnBlocklist ( ) : boolean
리턴 boolean

isUrlOnBlocklist() 공개 정적인 메소드

public static isUrlOnBlocklist ( $url, $entity = 'url' )

isUrlOnBlocklist() 공개 정적인 메소드

The public use of this function is undocumented.
public static isUrlOnBlocklist ( string $url, string $entity = 'url' ) : boolean
$url string
$entity string
리턴 boolean

protect() 공개 정적인 메소드

public static protect ( $action = '' )

protect() 공개 정적인 메소드

Block a page if referer is found on list of blocked domains.
public static protect ( string $action = '' )
$action string If empty, send 403 response; if URL, redirect here; if non-empty string, print message

프로퍼티 상세

$explanation 공개적으로 정적으로 프로퍼티

public static $explanation