/** * @inheritDoc */ public function detect(HandlerFactoryInterface $handlerFactory, RequestFile $requestFile) { $testIsWebM = in_array($requestFile->getType(), ['video/webm', 'audio/webm'], true); if ($testIsWebM) { return $handlerFactory->createFromStringCode('webm', $requestFile); } return false; }
/** * @inheritDoc */ public function detect(HandlerFactoryInterface $handlerFactory, RequestFile $requestFile) { $testIsImage = in_array($requestFile->getType(), $this->allowedMIMETypes, true); if ($testIsImage) { return $handlerFactory->createFromStringCode('image', $requestFile); } return false; }