added some api / internal tags

This commit is contained in:
kremsy 2017-04-07 23:38:18 +02:00
parent c94c1caf4b
commit d04a6b71fe
6 changed files with 49 additions and 7 deletions

View File

@ -20,6 +20,7 @@ use ManiaControl\Players\PlayerManager;
/**
* Class managing Actions Menus
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -68,6 +69,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
/**
* Add a new Menu Item
*
* @api
* @param Control $control
* @param bool $playerAction
* @param int $order
@ -84,6 +86,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
/**
* Add a new Player Menu Item
*
* @api
* @param Control $control
* @param int $order
* @param string $description
@ -99,6 +102,8 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
/**
* Build and show the menus to everyone (if a menu get made after the init)
*
* @api
*/
public function rebuildAndShowMenu() {
if (!$this->initCompleted) {
@ -266,6 +271,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
/**
* Add a new Admin Menu Item
*
* @api
* @param Control $control
* @param int $order
* @param string $description
@ -282,6 +288,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
/**
* Removes a Menu Item
*
* @api
* @param int $order
* @param bool $playerAction
*/
@ -300,6 +307,8 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
/**
* Handle ManiaControl AfterInit callback
*
* @internal
*/
public function handleAfterInit() {
$this->initCompleted = true;
@ -309,6 +318,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
/**
* Handle PlayerJoined callback
*
* @internal
* @param Player $player
*/
public function handlePlayerJoined(Player $player) {

View File

@ -24,6 +24,7 @@ use ManiaControl\Players\Player;
/**
* Widget Class listing Authorized Players
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -71,6 +72,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
/**
* Open Admin List Action
*
* @internal
* @param array $callback
* @param Player $player
*/
@ -81,6 +83,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
/**
* Show the Admin List
*
* @api
* @param Player $player
*/
public function showAdminLists(Player $player) {
@ -212,6 +215,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
/**
* Called on ManialinkPageAnswer
*
* @internal
* @param array $callback
*/
public function handleManialinkPageAnswer(array $callback) {
@ -235,6 +239,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
/**
* Reopen the widget on Map Begin, MapListChanged, etc.
*
* @internal
* @param Player $player
*/
public function updateWidget(Player $player) {
@ -253,6 +258,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
/**
* Closes the widget
*
* @internal
* @param Player $player
*/
public function closeWidget(Player $player) {
@ -262,6 +268,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
/**
* Unset the player if he opened another Main Widget
*
* @internal
* @param Player $player
* @param string $openedWidget
*/

View File

@ -43,6 +43,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
/**
* Handle //addsuperadmin command
*
* @internal
* @param array $chatCallback
* @param Player $player
*/
@ -85,6 +86,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
/**
* Handle //addadmin command
*
* @internal
* @param array $chatCallback
* @param Player $player
*/
@ -127,6 +129,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
/**
* Handle //addmod command
*
* @internal
* @param array $chatCallback
* @param Player $player
*/
@ -170,6 +173,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
/**
* Handle //removerights command
*
* @internal
* @param array $chatCallback
* @param Player $player
*/

View File

@ -19,6 +19,7 @@ use ManiaControl\Settings\Setting;
/**
* Class managing Authentication Levels
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -117,6 +118,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Get Name of the Authentication Level from Level Int
*
* @api
* @param mixed $authLevelInt
* @return string
*/
@ -138,6 +140,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Get the Authentication Level Int from the given Param
*
* @api
* @param mixed $authLevelParam
* @return int
*/
@ -154,6 +157,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Get Authentication Level Int from Level Name
*
* @api
* @param string $authLevelName
* @return int
*/
@ -175,6 +179,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Get the Abbreviation of the Authentication Level from Level Int
*
* @api
* @param mixed $authLevelInt
* @return string
*/
@ -195,6 +200,8 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Handle ManiaControl OnInit Callback
*
* @internal
*/
public function handleOnInit() {
$this->updateMasterAdmins();
@ -265,6 +272,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Get all connected Players with at least the given Auth Level
*
* @api
* @param int $authLevel
* @return Player[]
*/
@ -282,6 +290,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Check whether the Player has enough Rights
*
* @api
* @param Player $player
* @param int|Setting $neededAuthLevel
* @return bool
@ -296,6 +305,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Get a List of all Admins
*
* @api
* @param int $authLevel
* @return Player[]
*/
@ -323,6 +333,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Grant the Auth Level to the Player
*
* @api
* @param Player $player
* @param int $authLevel
* @return bool
@ -368,6 +379,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Send an Error Message to the Player
*
* @api
* @param Player $player
* @return bool
*/
@ -381,6 +393,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Checks the permission by a right name
*
* @api
* @param Player $player
* @param $rightName
* @return bool
@ -393,6 +406,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
/**
* Define a Minimum Right Level needed for an Action
*
* @api
* @param string $rightName
* @param int $authLevelNeeded
*/

View File

@ -7,6 +7,7 @@ use ManiaControl\Players\Player;
/**
* ManiaControl BillData Structure
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2015 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -27,6 +28,7 @@ class BillData {
/**
* Construct new Bill Data Model
*
* @api
* @param string $class
* @param callable $function
* @param Player|string $player

View File

@ -14,6 +14,7 @@ use Maniaplanet\DedicatedServer\Structures\Bill;
/**
* ManiaControl Bill Manager Class
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -54,6 +55,7 @@ class BillManager implements CallbackListener, UsageInformationAble {
/**
* Send a bill to a player
*
* @api
* @param callable $function
* @param Player $player
* @param int $amount
@ -80,6 +82,7 @@ class BillManager implements CallbackListener, UsageInformationAble {
/**
* Send planets from the server to a player
*
* @api
* @param callable $function
* @param string $receiverLogin
* @param int $amount
@ -104,13 +107,14 @@ class BillManager implements CallbackListener, UsageInformationAble {
/**
* Handle bill updated callback
*
* @internal
* @param array $callback
* @return bool
*/
public function handleBillUpdated(array $callback) {
$billId = $callback[1][0];
if (!isset($this->openBills[$billId])) {
return;
return null;
}
$billData = $this->openBills[$billId];
@ -142,5 +146,6 @@ class BillManager implements CallbackListener, UsageInformationAble {
unset($this->openBills[$billId]);
break;
}
return null;
}
}