Ejemplo n.º 1
0
 public function __construct(array $body)
 {
     parent::__construct($body);
     foreach ($this->attributes['abilities'] as &$ability) {
         $ability = new AbilityEntity($ability);
     }
 }
Ejemplo n.º 2
0
 public function __construct(array $body)
 {
     parent::__construct($body);
     if (array_key_exists('members', $this->attributes) === true) {
         foreach ($this->attributes['members'] as $key => $member) {
             $this->attributes['members'][$key]['character'] = new CharacterEntity($member);
         }
     }
 }
Ejemplo n.º 3
0
 public function __construct(array $body)
 {
     parent::__construct($body);
     if (array_key_exists('thumbnail', $this->attributes) === true) {
         $this->attributes['id'] = Utils::thumbnailToId($this->attributes['thumbnail']);
     }
     if (array_key_exists('lastModified', $this->attributes) === true) {
         $this->attributes['lastModified'] = $this->attributes['lastModified'] / 1000;
         $this->attributes['lastModified'] = \DateTime::createFromFormat('U', $this->attributes['lastModified']);
     }
 }
Ejemplo n.º 4
0
 /**
  * @param array $body
  */
 public function __construct(array $body)
 {
     parent::__construct($body);
     foreach ($this->attributes['achievements'] as &$achievement) {
         $achievement = new AchievementEntity($achievement);
     }
     if (array_key_exists('categories', $this->attributes) === true) {
         foreach ($this->attributes['categories'] as &$category) {
             $category = new self($category);
         }
     }
 }