Свойство | Тип | Описание | |
---|---|---|---|
$address | string | The address (host:port) where the server is listening for connections after being started. | |
$docroot | string | The document root of the server. | |
$pid | integer | The PID of the running server. | |
$router | string | The name of a "router" file to run for every request performed to this server. |
Метод | Описание | |
---|---|---|
__construct ( string | null $router = null, string | null $docroot = null ) | BuiltInServer constructor. | |
get ( string $query, array $parameters, array $curlopts = [] ) : array | string | This function performs an HTTP GET request to the built-in server. | |
getPid ( ) : integer | Get the PID of the running server. | |
getRouter ( ) : string | Get the name of the "router" file. | |
setRouter ( string $router ) | Set the "router" file. | |
start ( ) : string | Start the built-in server in a random port. | |
stop ( ) | Stop the built-in server. |
public get ( string $query, array $parameters, array $curlopts = [] ) : array | string | ||
$query | string | The query to perform. |
$parameters | array | An array (can be empty) with parameters for the requested URI. |
$curlopts | array | An array (can be empty) with options for cURL. |
Результат | array | string | The response obtained from the built-in server. |
protected string $address | ||
Результат | string |
protected string $docroot | ||
Результат | string |
protected string $router | ||
Результат | string |