PHP Class ElggRewriteTester, Elgg

Test if URL rewriting is working.
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Protected Properties

Свойство Type Description
$htaccessIssue
$rewriteTestPassed
$serverSupportsRemoteRead
$webserver

Méthodes publiques

Méthode Description
__construct ( ) Set the webserver as unknown.
createHtaccess ( string $url ) : boolean Create Elgg's .htaccess file or confirm that it exists
guessSubdirectory ( string $url ) : string | boolean Guess if url contains subdirectory or not.
guessWebServer ( ) : string Guess the web server from $_SERVER['SERVER_SOFTWARE']
run ( string $url, string $path ) : array Run the rewrite test and return a status array
runLocalhostAccessTest ( ) : boolean Check whether the site homepage can be fetched via curl
runRewriteTest ( string $url ) : boolean Hit the rewrite test URL to determine if the rewrite rules are working

Méthodes protégées

Méthode Description
returnStatus ( string $url ) : array Create the status array required by the ElggInstaller

Private Methods

Méthode Description
fetchUrl ( string $url ) : string Fetch a URL

Method Details

__construct() public méthode

Set the webserver as unknown.
public __construct ( )

createHtaccess() public méthode

Create Elgg's .htaccess file or confirm that it exists
public createHtaccess ( string $url ) : boolean
$url string URL of rewrite test
Résultat boolean

guessSubdirectory() public méthode

Guess if url contains subdirectory or not.
public guessSubdirectory ( string $url ) : string | boolean
$url string Rewrite test URL
Résultat string | boolean Subdirectory string with beginning and trailing slash or false if were unable to determine subdirectory or pointing at root of domain already

guessWebServer() public static méthode

Guess the web server from $_SERVER['SERVER_SOFTWARE']
public static guessWebServer ( ) : string
Résultat string

returnStatus() protected méthode

Create the status array required by the ElggInstaller
protected returnStatus ( string $url ) : array
$url string Rewrite test URL
Résultat array

run() public méthode

Run the rewrite test and return a status array
public run ( string $url, string $path ) : array
$url string URL of rewrite test
$path string Root directory of Elgg with trailing slash
Résultat array

runLocalhostAccessTest() public méthode

Check whether the site homepage can be fetched via curl
public runLocalhostAccessTest ( ) : boolean
Résultat boolean

runRewriteTest() public méthode

Hit the rewrite test URL to determine if the rewrite rules are working
public runRewriteTest ( string $url ) : boolean
$url string Rewrite test URL
Résultat boolean

Property Details

$htaccessIssue protected_oe property

protected $htaccessIssue

$rewriteTestPassed protected_oe property

protected $rewriteTestPassed

$serverSupportsRemoteRead protected_oe property

protected $serverSupportsRemoteRead

$webserver protected_oe property

protected $webserver