Elgg  Version 5.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 ($url, $path=null)
 Run the rewrite test and return a status array. More...
 
 runRewriteTest ($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 ($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 ($url)
 Guess if url contains subdirectory or not. More...
 
 returnStatus ($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 14 of file RewriteTester.php.

Constructor & Destructor Documentation

Elgg\Router\RewriteTester::__construct ( )

Set the webserver as unknown.

Definition at line 27 of file RewriteTester.php.

Member Function Documentation

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

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

Parameters
string$urlURL of rewrite test
Returns
bool

Definition at line 160 of file RewriteTester.php.

Elgg\Router\RewriteTester::guessSubdirectory (   $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 85 of file RewriteTester.php.

Elgg\Router\RewriteTester::guessWebServer ( )
protected

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

Returns
string

Definition at line 61 of file RewriteTester.php.

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

Create the status array required by the ElggInstaller.

Parameters
string$urlRewrite test URL
Returns
array

Definition at line 222 of file RewriteTester.php.

Elgg\Router\RewriteTester::run (   $url,
  $path = null 
)

Run the rewrite test and return a status array.

Parameters
string$urlURL of rewrite test
string$pathObsolete, don't use
Returns
array

Definition at line 39 of file RewriteTester.php.

Elgg\Router\RewriteTester::runLocalhostAccessTest ( )

Check whether the site homepage can be fetched via curl.

Returns
boolean

Definition at line 116 of file RewriteTester.php.

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

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

Parameters
string$urlRewrite test URL
Returns
bool

Definition at line 106 of file RewriteTester.php.

Member Data Documentation

string Elgg\Router\RewriteTester::$htaccessIssue
protected

Definition at line 22 of file RewriteTester.php.

bool Elgg\Router\RewriteTester::$rewriteTestPassed
protected

Definition at line 20 of file RewriteTester.php.

bool Elgg\Router\RewriteTester::$serverSupportsRemoteRead
protected

Definition at line 18 of file RewriteTester.php.

string Elgg\Router\RewriteTester::$webserver
protected

Definition at line 16 of file RewriteTester.php.


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