PHP Класс ElggRewriteTester, Elgg

Test if URL rewriting is working.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$htaccessIssue
$rewriteTestPassed
$serverSupportsRemoteRead
$webserver

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
returnStatus ( string $url ) : array Create the status array required by the ElggInstaller

Приватные методы

Метод Описание
fetchUrl ( string $url ) : string Fetch a URL

Описание методов

__construct() публичный Метод

Set the webserver as unknown.
public __construct ( )

createHtaccess() публичный Метод

Create Elgg's .htaccess file or confirm that it exists
public createHtaccess ( string $url ) : boolean
$url string URL of rewrite test
Результат boolean

guessSubdirectory() публичный Метод

Guess if url contains subdirectory or not.
public guessSubdirectory ( string $url ) : string | boolean
$url string Rewrite test URL
Результат 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() публичный статический Метод

Guess the web server from $_SERVER['SERVER_SOFTWARE']
public static guessWebServer ( ) : string
Результат string

returnStatus() защищенный Метод

Create the status array required by the ElggInstaller
protected returnStatus ( string $url ) : array
$url string Rewrite test URL
Результат array

run() публичный Метод

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
Результат array

runLocalhostAccessTest() публичный Метод

Check whether the site homepage can be fetched via curl
public runLocalhostAccessTest ( ) : boolean
Результат boolean

runRewriteTest() публичный Метод

Hit the rewrite test URL to determine if the rewrite rules are working
public runRewriteTest ( string $url ) : boolean
$url string Rewrite test URL
Результат boolean

Описание свойств

$htaccessIssue защищенное свойство

protected $htaccessIssue

$rewriteTestPassed защищенное свойство

protected $rewriteTestPassed

$serverSupportsRemoteRead защищенное свойство

protected $serverSupportsRemoteRead

$webserver защищенное свойство

protected $webserver