mirror of
https://github.com/Intervention/image.git
synced 2025-08-20 12:41:23 +02:00
Remove DriverInterface::specializeMultiple()
This commit is contained in:
@@ -149,27 +149,4 @@ abstract class AbstractDriver implements DriverInterface
|
||||
// attach driver
|
||||
return $specialized->setDriver($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see DriverInterface::specializeMultiple()
|
||||
*
|
||||
* @throws NotSupportedException
|
||||
* @throws DriverException
|
||||
*/
|
||||
public function specializeMultiple(array $objects): array
|
||||
{
|
||||
return array_map(
|
||||
function (string|object $object): ModifierInterface|AnalyzerInterface|EncoderInterface|DecoderInterface {
|
||||
return $this->specialize(
|
||||
match (true) {
|
||||
is_string($object) => new $object(),
|
||||
is_object($object) => $object,
|
||||
}
|
||||
);
|
||||
},
|
||||
$objects
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -35,16 +35,6 @@ interface DriverInterface
|
||||
ModifierInterface|AnalyzerInterface|EncoderInterface|DecoderInterface $object
|
||||
): ModifierInterface|AnalyzerInterface|EncoderInterface|DecoderInterface;
|
||||
|
||||
/**
|
||||
* Resolve array of classnames or objects into their specialized version for the current driver
|
||||
*
|
||||
* @param array<string|object> $objects
|
||||
* @throws NotSupportedException
|
||||
* @throws DriverException
|
||||
* @return array<object>
|
||||
*/
|
||||
public function specializeMultiple(array $objects): array;
|
||||
|
||||
/**
|
||||
* Create new image instance with the current driver in given dimensions
|
||||
*
|
||||
|
Reference in New Issue
Block a user