Elgg  Version 6.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\Router\RewriteTester Class Reference

Test if URL rewriting is working. More...

Public Member Functions

 __construct ()
 Set the webserver as unknown. More...
 
 run (string $url)
 Run the rewrite test and return a status array. More...
 
 runRewriteTest (string $url)
 Hit the rewrite test URL to determine if the rewrite rules are working. More...
 
 runLocalhostAccessTest ()
 Check whether the site homepage can be fetched via curl. More...
 
 createHtaccess (string $url)
 Create Elgg's .htaccess file or confirm that it exists. More...
 

Protected Member Functions

 guessWebServer ()
 Guess the web server from $_SERVER['SERVER_SOFTWARE']. More...
 
 guessSubdirectory (string $url)
 Guess if url contains subdirectory or not. More...
 
 returnStatus (string $url)
 Create the status array required by the ElggInstaller. More...
 

Protected Attributes

string $webserver
 
bool $serverSupportsRemoteRead
 
bool $rewriteTestPassed
 
string $htaccessIssue
 

Detailed Description

Test if URL rewriting is working.

Definition at line 13 of file RewriteTester.php.

Constructor & Destructor Documentation

Elgg\Router\RewriteTester::__construct ( )

Set the webserver as unknown.

Definition at line 26 of file RewriteTester.php.

Member Function Documentation

Elgg\Router\RewriteTester::createHtaccess ( string  $url)

Create Elgg's .htaccess file or confirm that it exists.

Parameters
string$urlURL of rewrite test
Returns
bool

Definition at line 158 of file RewriteTester.php.

Elgg\Router\RewriteTester::guessSubdirectory ( string  $url)
protected

Guess if url contains subdirectory or not.

Parameters
string$urlRewrite test URL
Returns
string|bool Subdirectory string with beginning and trailing slash or false if were unable to determine subdirectory or pointing at root of domain already

Definition at line 83 of file RewriteTester.php.

Elgg\Router\RewriteTester::guessWebServer ( )
protected

Guess the web server from $_SERVER['SERVER_SOFTWARE'].

Returns
string

Definition at line 59 of file RewriteTester.php.

Elgg\Router\RewriteTester::returnStatus ( string  $url)
protected

Create the status array required by the ElggInstaller.

Parameters
string$urlRewrite test URL
Returns
array

Definition at line 219 of file RewriteTester.php.

Elgg\Router\RewriteTester::run ( string  $url)

Run the rewrite test and return a status array.

Parameters
string$urlURL of rewrite test
Returns
array

Definition at line 37 of file RewriteTester.php.

Elgg\Router\RewriteTester::runLocalhostAccessTest ( )

Check whether the site homepage can be fetched via curl.

Returns
boolean

Definition at line 114 of file RewriteTester.php.

Elgg\Router\RewriteTester::runRewriteTest ( string  $url)

Hit the rewrite test URL to determine if the rewrite rules are working.

Parameters
string$urlRewrite test URL
Returns
bool

Definition at line 104 of file RewriteTester.php.

Member Data Documentation

string Elgg\Router\RewriteTester::$htaccessIssue
protected

Definition at line 21 of file RewriteTester.php.

bool Elgg\Router\RewriteTester::$rewriteTestPassed
protected

Definition at line 19 of file RewriteTester.php.

bool Elgg\Router\RewriteTester::$serverSupportsRemoteRead
protected

Definition at line 17 of file RewriteTester.php.

string Elgg\Router\RewriteTester::$webserver
protected

Definition at line 15 of file RewriteTester.php.


The documentation for this class was generated from the following file: