Example #1
0
 /**
  * @inheritdoc
  */
 public function populate($data)
 {
     parent::populate($data);
     $this->data['stats'] = $this->serviceLocator->get('wow.entity.arena.statistic');
     if (isset($this->headers)) {
         $this->data['stats']->setResponseHeaders($this->headers);
     }
     $this->data['stats']->populate($data['statistic']);
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function populate($data)
 {
     parent::populate($data);
     $this->data['lastmod'] = null;
     $this->data['lastModDate'] = null;
     if (isset($data['lastModified'])) {
         $this->data['lastModDate'] = new \DateTime('@' . round($data['lastModified'] / 1000, 0), new \DateTimeZone('UTC'));
         $this->data['lastmod'] = $data['lastModified'];
     }
     foreach ($this->services as $key => $service) {
         if (isset($data[$key])) {
             $array = $data[$key];
             if ($key === 'pvp') {
                 $array['realm'] = $data['realm'];
             }
             $this->data[$key] = $this->serviceLocator->get($service);
             if (isset($this->headers)) {
                 $this->data[$key]->setResponseHeaders($this->headers);
             }
             $this->data[$key]->populate($array);
         }
     }
 }
Example #3
0
 public function testIsNotDruid()
 {
     $this->assertFalse(self::$obj->isDruid());
 }