2014-10-10 16:19:46 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace ManiaControl\Callbacks\Structures;
|
|
|
|
|
|
|
|
|
2014-10-11 00:26:46 +02:00
|
|
|
use ManiaControl\ManiaControl;
|
2014-10-10 16:19:46 +02:00
|
|
|
use ManiaControl\Players\Player;
|
|
|
|
|
|
|
|
class CaptureStructure {
|
|
|
|
private $playerArray;
|
2014-10-11 00:26:46 +02:00
|
|
|
/** @var ManiaControl $maniaControl */
|
|
|
|
private $maniaControl;
|
2014-10-10 16:19:46 +02:00
|
|
|
|
2014-10-11 00:26:46 +02:00
|
|
|
public function __construct(ManiaControl $maniaControl, $data) {
|
|
|
|
$this->maniaControl = $maniaControl;
|
|
|
|
$this->playerArray = $data;
|
2014-10-10 16:19:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getLoginArray() {
|
|
|
|
return $this->playerArray;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Player[]
|
|
|
|
*/
|
|
|
|
public function getPlayerArray() {
|
2014-10-11 00:26:46 +02:00
|
|
|
$playerArray = array();
|
|
|
|
foreach ($this->playerArray as $login) {
|
|
|
|
$playerArray[$login] = $this->maniaControl->getPlayerManager()->getPlayer($this->playerArray);
|
|
|
|
}
|
|
|
|
return $playerArray;
|
2014-10-10 16:19:46 +02:00
|
|
|
}
|
|
|
|
}
|