Example #1
0
 /**
  * constructor
  *
  * @param	array	$card
  */
 public function __construct($card)
 {
     parent::__construct($card);
     $cardBaseTypeRepository = new CardBaseTypeRepository(TRUE);
     $cardBaseType = $cardBaseTypeRepository->getOneById($this['card_base_type']);
     $this->setAdditionalField('cardBaseType', $cardBaseType);
 }
Example #2
0
 public function __construct($player)
 {
     parent::__construct($player);
     $userRepository = new UserRepository();
     $user = $userRepository->getOneById($player['user']);
     $this->setAdditionalField('user', $user);
     $roleRepository = new RoleRepository(TRUE);
     $role = $roleRepository->getOneById($player['role']);
     $this->setAdditionalField('role', $role);
     $characterRepository = new CharacterRepository(TRUE);
     $character = $characterRepository->getOneById($player['charakter']);
     $this->setAdditionalField('character', $character);
     $cardRepository = new CardRepository(TRUE);
     $handCardsId = unserialize($player['hand_cards']);
     $handCards = array();
     if ($handCardsId) {
         $cardRepository->addOrderBy(array('card_base_type' => 'ASC'));
         $handCards = $cardRepository->getById($handCardsId);
     }
     $this->setAdditionalField('hand_cards', $handCards);
     $cardRepository = new CardRepository(TRUE);
     $tableCardsId = unserialize($player['table_cards']);
     $tableCards = array();
     if ($tableCardsId) {
         $cardRepository->addOrderBy(array('card_base_type' => 'ASC'));
         $tableCards = $cardRepository->getById($tableCardsId);
     }
     $this->setAdditionalField('table_cards', $tableCards);
     $waitCardsId = unserialize($player['wait_cards']);
     $waitCards = array();
     if ($waitCardsId) {
         $cardRepository->addOrderBy(array('card_base_type' => 'ASC'));
         $waitCards = $cardRepository->getById($waitCardsId);
     }
     $this->setAdditionalField('wait_cards', $waitCards);
     if ($player['notices']) {
         $notices = unserialize($player['notices']);
     } else {
         $notices = array();
     }
     $this->setAdditionalField('notice_list', $notices);
 }
Example #3
0
 public function __construct($user)
 {
     parent::__construct($user);
 }
Example #4
0
 public function __construct($role)
 {
     parent::__construct($role);
 }
Example #5
0
 public function __construct($character)
 {
     parent::__construct($character);
 }