Ejemplo n.º 1
0
 public static function createFromData(\stdClass $data)
 {
     /** @var static $publisher */
     $publisher = parent::createBaseFromData($data);
     foreach ($data->content as $contentData) {
         $publisher->content[] = PublisherContent::createFromData($contentData);
     }
     if (isset($data->contacts)) {
         $publisher->contactInformation = PublisherContactInformation::createFromData($data->contacts);
     }
     return $publisher;
 }
Ejemplo n.º 2
0
 public static function createFromData(\stdClass $data)
 {
     /** @var static $publisher */
     $publisher = parent::createBaseFromData($data);
     $publisher->languageCode = $data->language;
     $publisher->title = $data->title;
     $publisher->summary = $data->summary;
     if (isset($data->images)) {
         foreach ($data->images as $imageData) {
             $publisher->images[] = Image::createFromData($imageData);
         }
     }
     return $publisher;
 }
Ejemplo n.º 3
0
 /**
  * @return \Triquanta\IziTravel\DataType\PublisherInterface
  */
 public function execute()
 {
     $json = $this->requestHandler->get('/mtg/publishers/' . $this->uuid, ['languages' => $this->languageCodes, 'includes' => $this->includes, 'form' => $this->form]);
     return PublisherBase::createFromJson($json, $this->form);
 }
Ejemplo n.º 4
0
 /**
  * @covers ::isPublished
  */
 public function testIsPublished()
 {
     $this->assertTrue($this->sut->isPublished());
 }