PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
pocketmine\updater\UpdateChecker Class Reference
+ Collaboration diagram for pocketmine\updater\UpdateChecker:

Public Member Functions

 __construct (Server $server, string $endpoint)
 
 checkUpdateCallback (UpdateInfo $updateInfo)
 
 checkUpdateError (string $error)
 
 doCheck ()
 
 getChannel ()
 
 getEndpoint ()
 
 getUpdateInfo ()
 
 hasUpdate ()
 
 showConsoleUpdate ()
 

Protected Member Functions

 checkUpdate (UpdateInfo $updateInfo)
 
 printConsoleMessage (array $lines, string $logLevel=\LogLevel::INFO)
 
 showChannelSuggestionBeta ()
 
 showChannelSuggestionStable ()
 

Protected Attributes

string $endpoint
 
Server $server
 
UpdateInfo $updateInfo = null
 

Detailed Description

Definition at line 35 of file UpdateChecker.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\updater\UpdateChecker::__construct ( Server  $server,
string  $endpoint 
)

Definition at line 42 of file UpdateChecker.php.

Member Function Documentation

◆ checkUpdate()

pocketmine\updater\UpdateChecker::checkUpdate ( UpdateInfo  $updateInfo)
protected

Checks the update information against the current server version to decide if there's an update

Definition at line 140 of file UpdateChecker.php.

◆ checkUpdateCallback()

pocketmine\updater\UpdateChecker::checkUpdateCallback ( UpdateInfo  $updateInfo)

Callback used at the end of the update checking task

Definition at line 59 of file UpdateChecker.php.

References pocketmine\server(), and pocketmine\updater\UpdateChecker\showConsoleUpdate().

Referenced by pocketmine\updater\UpdateCheckTask\onCompletion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkUpdateError()

pocketmine\updater\UpdateChecker::checkUpdateError ( string  $error)

Definition at line 52 of file UpdateChecker.php.

◆ doCheck()

pocketmine\updater\UpdateChecker::doCheck ( )

Schedules an AsyncTask to check for an update.

Definition at line 133 of file UpdateChecker.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getChannel()

pocketmine\updater\UpdateChecker::getChannel ( )

Returns the channel used for update checking (stable, beta, dev)

Definition at line 160 of file UpdateChecker.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getEndpoint()

pocketmine\updater\UpdateChecker::getEndpoint ( )

Returns the host used for update checks.

Definition at line 167 of file UpdateChecker.php.

◆ getUpdateInfo()

pocketmine\updater\UpdateChecker::getUpdateInfo ( )

Returns the last retrieved update data.

Definition at line 126 of file UpdateChecker.php.

◆ hasUpdate()

pocketmine\updater\UpdateChecker::hasUpdate ( )

Returns whether there is an update available.

Definition at line 78 of file UpdateChecker.php.

◆ printConsoleMessage()

pocketmine\updater\UpdateChecker::printConsoleMessage ( array  $lines,
string  $logLevel = \LogLevel::INFO 
)
protected
Parameters
string[]$lines

Definition at line 117 of file UpdateChecker.php.

◆ showChannelSuggestionBeta()

pocketmine\updater\UpdateChecker::showChannelSuggestionBeta ( )
protected

Definition at line 107 of file UpdateChecker.php.

◆ showChannelSuggestionStable()

pocketmine\updater\UpdateChecker::showChannelSuggestionStable ( )
protected

Definition at line 100 of file UpdateChecker.php.

◆ showConsoleUpdate()

pocketmine\updater\UpdateChecker::showConsoleUpdate ( )

Posts a warning to the console to tell the user there is an update available

Definition at line 85 of file UpdateChecker.php.

Referenced by pocketmine\updater\UpdateChecker\checkUpdateCallback().

+ Here is the caller graph for this function:

Member Data Documentation

◆ $endpoint

string pocketmine\updater\UpdateChecker::$endpoint
protected

Definition at line 38 of file UpdateChecker.php.

◆ $server

Server pocketmine\updater\UpdateChecker::$server
protected

Definition at line 37 of file UpdateChecker.php.

◆ $updateInfo

UpdateInfo pocketmine\updater\UpdateChecker::$updateInfo = null
protected

Definition at line 39 of file UpdateChecker.php.


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