introductoin of callback models
added record callback model
This commit is contained in:
35
application/core/Callbacks/Models/BaseCallback.php
Normal file
35
application/core/Callbacks/Models/BaseCallback.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace ManiaControl\Callbacks\Models;
|
||||
|
||||
use ManiaControl\Players\Player;
|
||||
|
||||
/**
|
||||
* Base Model Class for Callbacks
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
abstract class BaseCallback {
|
||||
/*
|
||||
* Public Properties
|
||||
*/
|
||||
public $name = null;
|
||||
public $rawCallback = null;
|
||||
|
||||
public $pid = null;
|
||||
public $login = null;
|
||||
public $player = null;
|
||||
|
||||
/**
|
||||
* Set the corresponding Player
|
||||
*
|
||||
* @param Player $player
|
||||
*/
|
||||
public function setPlayer(Player $player) {
|
||||
$this->pid = $player->pid;
|
||||
$this->login = $player->login;
|
||||
$this->player = $player;
|
||||
}
|
||||
}
|
23
application/core/Callbacks/Models/RecordCallback.php
Normal file
23
application/core/Callbacks/Models/RecordCallback.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace ManiaControl\Callbacks\Models;
|
||||
|
||||
/**
|
||||
* Base Model Class for Callbacks
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class RecordCallback extends BaseCallback {
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
const CHECKPOINT = 'RecordCallback.Checkpoint';
|
||||
const FINISH = 'RecordCallback.Finish';
|
||||
|
||||
/*
|
||||
* Public Properties
|
||||
*/
|
||||
public $time = null;
|
||||
}
|
Reference in New Issue
Block a user