PHP Class Bramus\MCS\Scanner

Author: Bramus! ([email protected])
Datei anzeigen Open project: bramus/mixed-content-scan

Public Methods

Method Description
__construct ( string $rootUrl, Logger $logger, string[] $ignorePatterns ) Create a new Scanner instance.
getCheckCertificate ( ) : boolean Get checkCertificate value
getCrawl ( ) : boolean Get crawl value
getTimeout ( ) : integer Get timeout value
getVerifyHost ( ) : integer Get verifyHost value
queueUrl ( $url ) : boolean Queues an URL onto the queue if not queued yet
queueUrls ( array $urls ) : void Queue an array of URLs
scan ( ) : void Scan entire website
setCheckCertificate ( $checkCertificate ) Set checkCertificate value
setCrawl ( $crawl ) Set crawl value
setIgnorePatterns ( $ignorePatterns, $toReplace = '{$rootUrl}' )
setTimeout ( $timeout ) Set timeout value

Private Methods

Method Description
absolutizeUrl ( string $linkedUrl, string $currentPageUrl ) : string Make a given URL absolute
canonicalize ( $url ) : string Remove .
getContents ( string &$pageUrl ) : string Get the contents of a given URL (via GET)
scanPage ( string $pageUrl ) : string[] Scan a single URL
setRootUrl ( string $rootUrl, boolean $limitToPath = true ) Sets the root URL of the website to scan

Method Details

__construct() public method

Create a new Scanner instance.
public __construct ( string $rootUrl, Logger $logger, string[] $ignorePatterns )
$rootUrl string The (root)URL to start scanning
$logger Monolog\Logger
$ignorePatterns string[]

getCheckCertificate() public method

Get checkCertificate value
public getCheckCertificate ( ) : boolean
return boolean

getCrawl() public method

Get crawl value
public getCrawl ( ) : boolean
return boolean

getTimeout() public method

Get timeout value
public getTimeout ( ) : integer
return integer

getVerifyHost() public method

Get verifyHost value
public getVerifyHost ( ) : integer
return integer

queueUrl() public method

Queues an URL onto the queue if not queued yet
public queueUrl ( $url ) : boolean
return boolean

queueUrls() public method

Queue an array of URLs
public queueUrls ( array $urls ) : void
$urls array
return void

scan() public method

Scan entire website
public scan ( ) : void
return void

setCheckCertificate() public method

Set checkCertificate value
public setCheckCertificate ( $checkCertificate )

setCrawl() public method

Set crawl value
public setCrawl ( $crawl )

setIgnorePatterns() public method

public setIgnorePatterns ( $ignorePatterns, $toReplace = '{$rootUrl}' )

setTimeout() public method

Set timeout value
public setTimeout ( $timeout )