PHP 클래스 Jaybizzle\CrawlerDetect\CrawlerDetect

파일 보기 프로젝트 열기: jaybizzle/crawler-detect 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$crawlers Jaybizzle\CrawlerDetect\Fixtures\Crawlers Crawlers object.
$exclusions Jaybizzle\CrawlerDetect\Fixtures\Exclusions Exclusions object.
$httpHeaders array Headers that contain a user agent.
$matches array Store regex matches.
$uaHttpHeaders Jaybizzle\CrawlerDetect\Fixtures\Headers Headers object.
$userAgent null The user agent.

공개 메소드들

메소드 설명
__construct ( array $headers = null, $userAgent = null ) Class constructor.
getExclusions ( ) : string Build the replacement regex.
getMatches ( ) : string | null Return the matches.
getRegex ( ) : string Build the user agent regex.
getUaHttpHeaders ( ) : array Return user agent headers.
isCrawler ( string $userAgent = null ) : boolean Check user agent string against the regex.
setHttpHeaders ( array $httpHeaders = null ) Set HTTP headers.
setUserAgent ( string $userAgent = null ) Set the user agent.

메소드 상세

__construct() 공개 메소드

Class constructor.
public __construct ( array $headers = null, $userAgent = null )
$headers array

getExclusions() 공개 메소드

Build the replacement regex.
public getExclusions ( ) : string
리턴 string

getMatches() 공개 메소드

Return the matches.
public getMatches ( ) : string | null
리턴 string | null

getRegex() 공개 메소드

Build the user agent regex.
public getRegex ( ) : string
리턴 string

getUaHttpHeaders() 공개 메소드

Return user agent headers.
public getUaHttpHeaders ( ) : array
리턴 array

isCrawler() 공개 메소드

Check user agent string against the regex.
public isCrawler ( string $userAgent = null ) : boolean
$userAgent string
리턴 boolean

setHttpHeaders() 공개 메소드

Set HTTP headers.
public setHttpHeaders ( array $httpHeaders = null )
$httpHeaders array

setUserAgent() 공개 메소드

Set the user agent.
public setUserAgent ( string $userAgent = null )
$userAgent string

프로퍼티 상세

$crawlers 보호되어 있는 프로퍼티

Crawlers object.
protected Crawlers,Jaybizzle\CrawlerDetect\Fixtures $crawlers
리턴 Jaybizzle\CrawlerDetect\Fixtures\Crawlers

$exclusions 보호되어 있는 프로퍼티

Exclusions object.
protected Exclusions,Jaybizzle\CrawlerDetect\Fixtures $exclusions
리턴 Jaybizzle\CrawlerDetect\Fixtures\Exclusions

$httpHeaders 보호되어 있는 프로퍼티

Headers that contain a user agent.
protected array $httpHeaders
리턴 array

$matches 보호되어 있는 프로퍼티

Store regex matches.
protected array $matches
리턴 array

$uaHttpHeaders 보호되어 있는 프로퍼티

Headers object.
protected Headers,Jaybizzle\CrawlerDetect\Fixtures $uaHttpHeaders
리턴 Jaybizzle\CrawlerDetect\Fixtures\Headers

$userAgent 보호되어 있는 프로퍼티

The user agent.
protected null $userAgent
리턴 null