PHP Class EmbeddedServer, ojs

Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( )
_canExecScripts ( ) : boolean Check whether script execution is enabled.
_getLogFileName ( ) : string Get the embedded server log.
_getPluginDirectory ( ) : string Find the plugin directory.
_getScriptDirectory ( ) : string Find the script directory.
_getScriptPath ( $script ) : string Get platform-specific script name with extension.
_runScript ( $script, $log = true, $parameters = '' ) : boolean Run the given script.
isAvailable ( ) : boolean Check whether an embedded server is installed and we can manipulate it through PHP.
isInstalled ( ) : boolean Check whether the embedded server is installed.
isRunning ( ) : boolean Check whether the embedded server is currently running.
start ( ) : boolean Start the embedded server.
stop ( ) : boolean Stop the embedded server.
stopAndWait ( ) : boolean Stop the embedded server and wait until it actually exited.

Method Details

__construct() public méthode

public __construct ( )

_canExecScripts() public méthode

Check whether script execution is enabled.
public _canExecScripts ( ) : boolean
Résultat boolean

_getLogFileName() public méthode

Get the embedded server log.
public _getLogFileName ( ) : string
Résultat string

_getPluginDirectory() public méthode

Find the plugin directory.
public _getPluginDirectory ( ) : string
Résultat string

_getScriptDirectory() public méthode

Find the script directory.
public _getScriptDirectory ( ) : string
Résultat string

_getScriptPath() public méthode

Get platform-specific script name with extension.
public _getScriptPath ( $script ) : string
$script string The script name without extension.
Résultat string script name with platform specific extension.

_runScript() public méthode

Run the given script.
public _runScript ( $script, $log = true, $parameters = '' ) : boolean
$script string The script to be executed (without platform specific extension).
$log boolean Whether to log the script execution. Logging is NOT supported on Windows due to locking issues with the log file when being started through 'start /b'.
$parameters string Optional script parameters.
Résultat boolean true if the command executed successfully, otherwise false.

isAvailable() public méthode

Check whether an embedded server is installed and we can manipulate it through PHP.
public isAvailable ( ) : boolean
Résultat boolean

isInstalled() public méthode

Check whether the embedded server is installed.
public isInstalled ( ) : boolean
Résultat boolean

isRunning() public méthode

Check whether the embedded server is currently running.
public isRunning ( ) : boolean
Résultat boolean true, if the server is running, otherwise false.

start() public méthode

NB: The web service can take quite a bit longer than the process to start. So if you want to be sure you should instantiate SolrWebService and wait until it's status is SOLR_STATUS_ONLINE.
public start ( ) : boolean
Résultat boolean true if the server started, otherwise false.

stop() public méthode

Stop the embedded server.
public stop ( ) : boolean
Résultat boolean true if the server stopped, otherwise false.

stopAndWait() public méthode

Stop the embedded server and wait until it actually exited.
public stopAndWait ( ) : boolean
Résultat boolean true if the server stopped, otherwise false.