ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
Image.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
21 
24 use ILIAS\Data\URI;
25 
29 class Image extends Resource
30 {
31  public function __construct(
32  URI $image_url,
33  string $mime_type,
34  ?string $aria_label = null,
35  ?int $width = null,
36  ?int $height = null,
37  ) {
39  $image_url,
40  $mime_type,
41  (null !== $aria_label) ? new Text('og:image:alt', $aria_label) : new NullTag(),
42  (null !== $width) ? new Text('og:image:width', (string) $width) : new NullTag(),
43  (null !== $height) ? new Text('og:image:height', (string) $height) : new NullTag(),
44  );
45  }
46 
47  protected function getPropertyName(): string
48  {
49  return 'og:image';
50  }
51 }
__construct(VocabulariesInterface $vocabularies)
The scope of this class is split ilias-conform URI&#39;s into components.
Definition: URI.php:18
__construct(URI $image_url, string $mime_type, ?string $aria_label=null, ?int $width=null, ?int $height=null,)
Definition: Image.php:31