public function __construct($thumbnail_loc, $title, $description, $content_loc = null, $player_loc = null) { parent::__construct(); $this->thumbnail_loc = $thumbnail_loc; $this->title = $title; $this->description = $description; $this->content_loc = $content_loc; if ($player_loc !== null) { $this->player_loc = ['allow_embed' => 'yes', 'text' => $player_loc]; } $this->props['tag'] = new Collection(); $this->props['price'] = new Collection(); }
public function __construct($publication_name, $publication_language, $title, $publication_date) { parent::__construct(); $this->publication = ['name' => $publication_name, 'language' => $publication_language]; $this->title = $title; if ($publication_date !== null && !$publication_date instanceof Carbon) { if ($publication_date instanceof DateTime) { $publication_date = Carbon::instance($publication_date)->toW3CString(); } else { $publication_date = Carbon::parse($publication_date)->toW3CString(); } } $this->publication_date = $publication_date; }
public function __construct($loc) { parent::__construct(); $this->loc = $loc; }