add UsageInformation Interface to every class which can be used by Plugin Authors
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
namespace ManiaControl\Callbacks;
|
||||
|
||||
use ManiaControl\Callbacks\Models\BaseCallback;
|
||||
use ManiaControl\General\UsageInformationAble;
|
||||
use ManiaControl\General\UsageInformationTrait;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
@ -12,7 +14,9 @@ use ManiaControl\ManiaControl;
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class CallbackManager {
|
||||
class CallbackManager implements UsageInformationAble {
|
||||
use UsageInformationTrait;
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
|
@ -3,6 +3,8 @@
|
||||
namespace ManiaControl\Callbacks;
|
||||
|
||||
|
||||
use ManiaControl\General\UsageInformationAble;
|
||||
use ManiaControl\General\UsageInformationTrait;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
@ -12,7 +14,9 @@ use ManiaControl\ManiaControl;
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class EchoManager implements CallbackListener, EchoListener {
|
||||
class EchoManager implements CallbackListener, EchoListener, UsageInformationAble {
|
||||
use UsageInformationTrait;
|
||||
|
||||
/*
|
||||
* Private properties
|
||||
*/
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
namespace ManiaControl\Callbacks;
|
||||
|
||||
use ManiaControl\General\UsageInformationAble;
|
||||
use ManiaControl\General\UsageInformationTrait;
|
||||
|
||||
/**
|
||||
* Model Class for a Basic Listening
|
||||
*
|
||||
@ -9,12 +12,14 @@ namespace ManiaControl\Callbacks;
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class Listening {
|
||||
class Listening implements UsageInformationAble {
|
||||
use UsageInformationTrait;
|
||||
|
||||
/*
|
||||
* Public Properties
|
||||
*/
|
||||
public $listener = null;
|
||||
public $method = null;
|
||||
public $method = null;
|
||||
|
||||
/**
|
||||
* Construct a new Timer Listening
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
namespace ManiaControl\Callbacks;
|
||||
|
||||
use ManiaControl\General\UsageInformationAble;
|
||||
use ManiaControl\General\UsageInformationTrait;
|
||||
|
||||
/**
|
||||
* Model Class for a Timer Listening
|
||||
*
|
||||
@ -9,12 +12,14 @@ namespace ManiaControl\Callbacks;
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class TimerListening extends Listening {
|
||||
class TimerListening extends Listening implements UsageInformationAble {
|
||||
use UsageInformationTrait;
|
||||
|
||||
/*
|
||||
* Public Properties
|
||||
*/
|
||||
public $deltaTime = null;
|
||||
public $oneTime = null;
|
||||
public $deltaTime = null;
|
||||
public $oneTime = null;
|
||||
public $lastTrigger = null;
|
||||
public $instantCall = null;
|
||||
|
||||
@ -31,11 +36,11 @@ class TimerListening extends Listening {
|
||||
parent::__construct($listener, $method);
|
||||
|
||||
$this->deltaTime = $milliSeconds / 1000.;
|
||||
$this->oneTime = (bool)$oneTime;
|
||||
$this->oneTime = (bool) $oneTime;
|
||||
if ($this->oneTime) {
|
||||
$this->lastTrigger = time(true);
|
||||
$this->lastTrigger = microtime(true); //TODO verify before here was time()
|
||||
}
|
||||
$this->instantCall = (bool)$instantCall;
|
||||
$this->instantCall = (bool) $instantCall;
|
||||
if (!$this->instantCall) {
|
||||
$this->lastTrigger = microtime(true);
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace ManiaControl\Callbacks;
|
||||
|
||||
use ManiaControl\General\UsageInformationAble;
|
||||
use ManiaControl\General\UsageInformationTrait;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
@ -11,7 +13,9 @@ use ManiaControl\ManiaControl;
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class TimerManager {
|
||||
class TimerManager implements UsageInformationAble {
|
||||
use UsageInformationTrait;
|
||||
|
||||
/*
|
||||
* Private properties
|
||||
*/
|
||||
|
Reference in New Issue
Block a user