uawdijnntqw1x1x1
IP : 216.73.216.107
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
.
/
pixelandtonic
/
imagine
/
src
/
Image
/
FormatList.php
/
/
<?php namespace Imagine\Image; /** * Holds a list of image formats. * * @since 1.3.0 */ class FormatList { /** * @var \Imagine\Image\Format[] */ private $formats; public function __construct(array $formats) { $this->formats = $formats; } /** * @return \Imagine\Image\Format[] */ public function getAll() { return $this->formats; } /** * @return string[] */ public function getAllIDs() { $result = array(); foreach ($this->getAll() as $format) { $result[] = $format->getID(); } return $result; } /** * Get a format given its ID. * * @param \Imagine\Image\Format|string $format the format (a Format instance of a format ID) * * @return \Imagine\Image\Format|null */ public function find($format) { if (is_string($format)) { $format = strtolower(trim($format)); if ($format === '') { return null; } foreach ($this->getAll() as $f) { if ($f->getID() === $format || in_array($format, $f->getAlternativeIDs(), true)) { return $f; } } return null; } return in_array($format, $this->getAll(), true) ? $format : null; } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/./pixelandtonic/imagine/src/Image/FormatList.php