url = $url; } /** * Gets all properties set on this element. * * @return Property[] */ public function getProperties(): array { $properties = []; // URL must precede all other properties if (null !== $this->url) { $properties[] = new Property(Property::IMAGE_URL, $this->url); } if (null !== $this->height) { $properties[] = new Property(Property::IMAGE_HEIGHT, $this->height); } if (null !== $this->secureUrl) { $properties[] = new Property(Property::IMAGE_SECURE_URL, $this->secureUrl); } if (null !== $this->type) { $properties[] = new Property(Property::IMAGE_TYPE, $this->type); } if (null !== $this->width) { $properties[] = new Property(Property::IMAGE_WIDTH, $this->width); } if (null !== $this->userGenerated) { $properties[] = new Property(Property::IMAGE_USER_GENERATED, $this->userGenerated); } return $properties; } }