various phpdoc improvements and additions
added some getter methods for properties
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
namespace ManiaControl\Update;
|
||||
|
||||
/**
|
||||
* Plugin Update Data Structure
|
||||
* Plugin Update Data Model Class
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014 ManiaControl Team
|
||||
@ -11,7 +11,7 @@ namespace ManiaControl\Update;
|
||||
*/
|
||||
class PluginUpdateData {
|
||||
/*
|
||||
* Public Properties
|
||||
* Public properties
|
||||
*/
|
||||
public $pluginId = null;
|
||||
public $pluginName = null;
|
||||
@ -23,7 +23,7 @@ class PluginUpdateData {
|
||||
public $url = null;
|
||||
|
||||
/**
|
||||
* Construct new Plugin Update Data
|
||||
* Construct new plugin update data instance
|
||||
*
|
||||
* @param object $updateData
|
||||
*/
|
||||
@ -41,7 +41,7 @@ class PluginUpdateData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the Plugin Update Data is newer than the given Plugin Version
|
||||
* Check if the plugin update data is newer than the given plugin version
|
||||
*
|
||||
* @param float $version
|
||||
* @return bool
|
||||
|
@ -25,12 +25,12 @@ use ManiaControl\Utils\WebReader;
|
||||
*/
|
||||
class PluginUpdateManager implements CallbackListener, CommandListener, TimerListener {
|
||||
/*
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
|
||||
/**
|
||||
* Create a new Plugin Update Manager
|
||||
* Create a new plugin update manager instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace ManiaControl\Update;
|
||||
|
||||
/**
|
||||
* Update Data Structure
|
||||
* ManiaControl Update Data Model Class
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014 ManiaControl Team
|
||||
@ -11,7 +11,7 @@ namespace ManiaControl\Update;
|
||||
*/
|
||||
class UpdateData {
|
||||
/*
|
||||
* Public Properties
|
||||
* Public properties
|
||||
*/
|
||||
public $version = null;
|
||||
public $channel = null;
|
||||
@ -20,7 +20,7 @@ class UpdateData {
|
||||
public $minDedicatedBuild = null;
|
||||
|
||||
/**
|
||||
* Construct new Update Data
|
||||
* Construct new update data instance
|
||||
*
|
||||
* @param object $updateData
|
||||
*/
|
||||
@ -33,7 +33,7 @@ class UpdateData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the Update Data is newer than the given Date
|
||||
* Check if the update data is newer than the given date
|
||||
*
|
||||
* @param string $compareDate
|
||||
* @return bool
|
||||
|
@ -35,22 +35,22 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
|
||||
const CHANNEL_NIGHTLY = 'nightly';
|
||||
|
||||
/*
|
||||
* Public Properties
|
||||
* Public properties
|
||||
*/
|
||||
/** @var PluginUpdateManager $pluginUpdateManager */
|
||||
public $pluginUpdateManager = null;
|
||||
/** @var UpdateData $coreUpdateData */
|
||||
public $coreUpdateData = null;
|
||||
|
||||
/*
|
||||
* Private Properties
|
||||
* Private properties
|
||||
*/
|
||||
/** @var ManiaControl $maniaControl */
|
||||
private $maniaControl = null;
|
||||
private $currentBuildDate = null;
|
||||
/** @var UpdateData $coreUpdateData */
|
||||
private $coreUpdateData = null;
|
||||
|
||||
/**
|
||||
* Create a new Update Manager
|
||||
* Create a new update manager instance
|
||||
*
|
||||
* @param ManiaControl $maniaControl
|
||||
*/
|
||||
@ -83,7 +83,7 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the possible Update Channels
|
||||
* Get the possible update channels
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
@ -92,6 +92,15 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
|
||||
return array(self::CHANNEL_BETA, self::CHANNEL_RELEASE, self::CHANNEL_NIGHTLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the plugin update manager
|
||||
*
|
||||
* @return PluginUpdateManager
|
||||
*/
|
||||
public function getPluginUpdateManager() {
|
||||
return $this->pluginUpdateManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform Hourly Update Check
|
||||
*/
|
||||
@ -316,7 +325,9 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
|
||||
}
|
||||
|
||||
$updateData = $this->coreUpdateData;
|
||||
$this->maniaControl->fileReader->loadFile($updateData->url, function ($updateFileContent, $error) use ($updateData, &$player) {
|
||||
$this->maniaControl->fileReader->loadFile($updateData->url, function ($updateFileContent, $error) use (
|
||||
$updateData, &$player
|
||||
) {
|
||||
if (!$updateFileContent || $error) {
|
||||
$message = "Update failed: Couldn't load Update zip! {$error}";
|
||||
if ($player) {
|
||||
|
Reference in New Issue
Block a user