Skip to content

Commit

Permalink
add comment and constant
Browse files Browse the repository at this point in the history
  • Loading branch information
macintoshplus committed Aug 20, 2020
1 parent 1e6dfe7 commit 4e33343
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions lib/pollyfill.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,41 @@ function win32_get_last_control_message()
}

if (!\function_exists('win32_set_service_status')) {
$GLOBALS['__serviceStatus'] = WIN32_SERVICE_START_PENDING;
\define('WIN32_FAKE_SERVICE_STATUS', '__serviceStatus', false);
$GLOBALS[WIN32_FAKE_SERVICE_STATUS] = WIN32_SERVICE_START_PENDING;
function win32_set_service_status($status)
{
$GLOBALS['__serviceStatus'] = $status;
$GLOBALS[WIN32_FAKE_SERVICE_STATUS] = $status;
}

function win32_query_service_status($ServiceName, $Machine)
{
return ['CurrentState' => $GLOBALS['__serviceStatus']];
return ['CurrentState' => $GLOBALS[WIN32_FAKE_SERVICE_STATUS]];
}
}
if (!\function_exists('win32_set_service_exit_mode')) {
/*
* Empty function beacause, it not work on non WINNT operating System.
* Declared only for method exists.
*/
function win32_set_service_exit_mode($GracefulExit)
{
}
}
if (!\function_exists('win32_set_service_exit_code')) {
/*
* Empty function beacause, it not work on non WINNT operating System.
* Declared only for method exists.
*/
function win32_set_service_exit_code($ExitCode)
{
}
}
if (!\function_exists('win32_send_custom_control')) {
/*
* Empty function beacause, it not work on non WINNT operating System.
* Declared only for method exists.
*/
function win32_send_custom_control($ServiceName, $Control, $Machine)
{
}
Expand Down

0 comments on commit 4e33343

Please sign in to comment.