Loheide-eu-mitarbeiterplatt.../vendor/intervention/image/src/Interfaces/DriverInterface.php
Friederich Loheide 9c0f8de791
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
Phase 0: Fundament für Inhaus
- Laravel 13 mit Filament 5 (Admin), Inertia 3 + Vue 3 + Vuetify 4 (Material 3)
- Anmeldung über Fortify (Login, Passwort vergessen/ändern), keine Selbstregistrierung
- Profil mit Profilbild (WebP in festen Größen), Personenseiten, Header mit Avatar-Menü
- Material-3-Farbschema aus der Primärfarbe, hell/dunkel/System pro Person
- Basis-Branding (Portalname, Logo, Primärfarbe) im Admin unter „Erscheinungsbild“
- Benutzerverwaltung im Admin, Zugang vorläufig über is_admin
- vendor/ (ohne Dev-Pakete) und Frontend-Build mitversioniert, Dev-Pakete in vendor-dev/
- PHPUnit-Tests gegen MySQL/MariaDB, Forgejo-CI-Matrix, Docker-Entwicklungsumgebung
- VERSION, CHANGELOG.md und CONTRIBUTING.md mit Release-Ablauf

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 20:35:30 +00:00

133 lines
3.8 KiB
PHP

<?php
declare(strict_types=1);
namespace Intervention\Image\Interfaces;
use Intervention\Image\Config;
use Intervention\Image\Exceptions\MissingDependencyException;
use Intervention\Image\FileExtension;
use Intervention\Image\Format;
use Intervention\Image\MediaType;
interface DriverInterface
{
/**
* Create new driver instance with configuration.
*/
public function __construct(Config $config);
/**
* Return drivers unique id.
*/
public function id(): string;
/**
* Get driver configuration.
*/
public function config(): Config;
/**
* Resolve given modifier into a specialized version for the current driver.
*
* @template T of ModifierInterface
* @param T $modifier
* @return T
*/
public function specializeModifier(ModifierInterface $modifier): ModifierInterface;
/**
* Resolve given analyzer into a specialized version for the current driver.
*
* @template T of AnalyzerInterface
* @param T $analyzer
* @return T
*/
public function specializeAnalyzer(AnalyzerInterface $analyzer): AnalyzerInterface;
/**
* Resolve given encoder into a specialized version for the current driver.
*
* @template T of EncoderInterface
* @param T $encoder
* @return T
*/
public function specializeEncoder(EncoderInterface $encoder): EncoderInterface;
/**
* Resolve given decoder into a specialized version for the current driver.
*
* @template T of DecoderInterface
* @param T $decoder
* @return T
*/
public function specializeDecoder(DecoderInterface $decoder): DecoderInterface;
/**
* Create new image instance in the given dimensions and with full transparent
* background and the current driver in given dimensions.
*/
public function createImage(int $width, int $height): ImageInterface;
/**
* Create new core instance from array of frame objects.
*
* @param array<int|string, FrameInterface> $frames
*/
public function createCore(array $frames): CoreInterface;
/**
* Decode image source with given decoders. Try all image decoders by default.
*
* Image sources can be as follows:
*
* - Path in filesystem
* - Raw binary image data
* - Base64 encoded image data
* - Data Uri
* - Stream resource
* - SplFileInfo object
* - Intervention Image Instance (Intervention\Image\Image)
* - Encoded Intervention Image (Intervention\Image\EncodedImage)
* - Driver-specific image (instance of GDImage or Imagick)
*
* @param array<string|DecoderInterface> $decoders
*/
public function decodeImage(mixed $input, ?array $decoders = null): ImageInterface;
/**
* Decode color source with given decoders. Try all color decoders by default.
*
* @param array<string|DecoderInterface> $decoders
*/
public function decodeColor(mixed $input, ?array $decoders = null): ColorInterface;
/**
* Return color processor for the given image and its colorspace.
*/
public function colorProcessor(ImageInterface $image): ColorProcessorInterface;
/**
* Return font processor of the current driver.
*/
public function fontProcessor(): FontProcessorInterface;
/**
* Check whether all requirements for operating the driver are met and
* throw exception if the check fails.
*
* @throws MissingDependencyException
*/
public function checkHealth(): void;
/**
* Check if the current driver supports the given format and if the
* underlying PHP extension was built with support for the format.
*/
public function supports(string|Format|FileExtension|MediaType $identifier): bool;
/**
* Return the version number of the image driver currently in use.
*/
public function version(): string;
}