public function matchSerializerByExtension($fileName)
    {
        /** @var \Thelia\Core\Serializer\AbstractSerializer $serializer */
        foreach ($this->serializerManager->getSerializers() as $serializer) {
            if (stripos($fileName, '.' . $serializer->getExtension()) !== false) {
                return $serializer;
            }
        }

        return null;
    }
public function matchSerializerByExtension($fileName)
    {
        /** @var \Thelia\Core\Serializer\AbstractSerializer $serializer */
        foreach ($this->serializerManager->getSerializers() as $serializer) {
            if (stripos($fileName, '.' . $serializer->getExtension()) !== false) {
                return $serializer;
            }
        }

        return null;
    }
public function matchSerializerByExtension ( $ fileName ) { /** @var \Thelia\Core\Serializer\AbstractSerializer $serializer */ foreach ( $ this -> serializerManager -> getSerializers ( ) as $ serializer ) { if ( stripos ( $ fileName , '.' . $ serializer -> getExtension ( ) ) !== false ) { return $ serializer ; } } return null ; }
Match serializer relative to file name

@param string $fileName File name

@return null|\Thelia\Core\Serializer\AbstractSerializer
Match serializer relative to file name