Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
/*
* This file is part of MediaVorus.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaVorus\Utils;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
/**
*
* @author Romain Neutron - imprec@gmail.com
* @license http://opensource.org/licenses/MIT MIT
*/
class AudioMimeTypeGuesser implements MimeTypeGuesserInterface
{
public static $videoMimeTypes = array(
'ape' => 'audio/x-monkeys-audio',
'mp3' => 'audio/mpeg',
);
/**
* {@inheritdoc}
*/
public function guess($path)
{
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (array_key_exists($extension, static::$videoMimeTypes)) {
return static::$videoMimeTypes[$extension];
}
return null;
}
}

View File

@@ -0,0 +1,43 @@
<?php
/*
* This file is part of MediaVorus.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaVorus\Utils;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
/**
*
* @author Romain Neutron - imprec@gmail.com
* @license http://opensource.org/licenses/MIT MIT
*/
class DocumentMimeTypeGuesser implements MimeTypeGuesserInterface
{
public static $documentMimeTypes = array(
'xls' => 'application/vnd.ms-excel',
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
);
/**
* {@inheritdoc}
*/
public function guess($path)
{
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (array_key_exists($extension, static::$documentMimeTypes)) {
return static::$documentMimeTypes[$extension];
}
return null;
}
}

View File

@@ -0,0 +1,40 @@
<?php
/*
* This file is part of MediaVorus.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaVorus\Utils;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
/**
*
* @author Romain Neutron - imprec@gmail.com
* @license http://opensource.org/licenses/MIT MIT
*/
class FlashMimeTypeGuesser implements MimeTypeGuesserInterface
{
public static $flashMimeTypes = array(
'swf' => 'application/x-shockwave-flash',
);
/**
* {@inheritdoc}
*/
public function guess($path)
{
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (array_key_exists($extension, static::$flashMimeTypes)) {
return static::$flashMimeTypes[$extension];
}
return null;
}
}

View File

@@ -0,0 +1,41 @@
<?php
/*
* This file is part of MediaVorus.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaVorus\Utils;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
/**
*
* @author Romain Neutron - imprec@gmail.com
* @license http://opensource.org/licenses/MIT MIT
*/
class ImageMimeTypeGuesser implements MimeTypeGuesserInterface
{
public static $imageMimeTypes = array(
'heic'=> 'image/heic',
'heif'=> 'image/heif',
);
/**
* {@inheritdoc}
*/
public function guess($path)
{
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (array_key_exists($extension, static::$imageMimeTypes)) {
return static::$imageMimeTypes[$extension];
}
return null;
}
}

View File

@@ -0,0 +1,42 @@
<?php
/*
* This file is part of MediaVorus.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaVorus\Utils;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
/**
*
* @author Romain Neutron - imprec@gmail.com
* @license http://opensource.org/licenses/MIT MIT
*/
class PostScriptMimeTypeGuesser implements MimeTypeGuesserInterface
{
public static $postscriptMimeTypes = array(
'eps' => 'application/postscript',
'ai' => 'application/illustrator',
'indd' => 'application/x-indesign',
);
/**
* {@inheritdoc}
*/
public function guess($path)
{
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (array_key_exists($extension, static::$postscriptMimeTypes)) {
return static::$postscriptMimeTypes[$extension];
}
return null;
}
}

View File

@@ -0,0 +1,72 @@
<?php
/*
* This file is part of MediaVorus.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaVorus\Utils;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
/**
*
* @author Romain Neutron - imprec@gmail.com
* @license http://opensource.org/licenses/MIT MIT
*/
class RawImageMimeTypeGuesser implements MimeTypeGuesserInterface
{
public static $rawMimeTypes = array(
'3fr' => 'image/x-tika-hasselblad',
'arw' => 'image/x-tika-sony',
'bay' => 'image/x-tika-casio',
'cap' => 'image/x-tika-phaseone',
'cr2' => 'image/x-tika-canon',
'crw' => 'image/x-tika-canon',
'dcs' => 'image/x-tika-kodak',
'dcr' => 'image/x-tika-kodak',
'dng' => 'image/x-tika-dng',
'drf' => 'image/x-tika-kodak',
'erf' => 'image/x-tika-epson',
'fff' => 'image/x-tika-imacon',
'iiq' => 'image/x-tika-phaseone',
'kdc' => 'image/x-tika-kodak',
'k25' => 'image/x-tika-kodak',
'mef' => 'image/x-tika-mamiya',
'mos' => 'image/x-tika-leaf',
'mrw' => 'image/x-tika-minolta',
'nef' => 'image/x-tika-nikon',
'nrw' => 'image/x-tika-nikon',
'orf' => 'image/x-tika-olympus',
'pef' => 'image/x-tika-pentax',
'ppm' => 'image/x-portable-pixmap',
'ptx' => 'image/x-tika-pentax',
'pxn' => 'image/x-tika-logitech',
'raf' => 'image/x-tika-fuji',
'raw' => 'image/x-tika-panasonic',
'r3d' => 'image/x-tika-red',
'rw2' => 'image/x-tika-panasonic',
'rwz' => 'image/x-tika-rawzor',
'sr2' => 'image/x-tika-sony',
'srf' => 'image/x-tika-sony',
'x3f' => 'image/x-tika-sigma',
);
/**
* {@inheritdoc}
*/
public function guess($path)
{
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (array_key_exists($extension, static::$rawMimeTypes)) {
return static::$rawMimeTypes[$extension];
}
return null;
}
}

View File

@@ -0,0 +1,44 @@
<?php
/*
* This file is part of MediaVorus.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaVorus\Utils;
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
/**
*
* @author Romain Neutron - imprec@gmail.com
* @license http://opensource.org/licenses/MIT MIT
*/
class VideoMimeTypeGuesser implements MimeTypeGuesserInterface
{
public static $videoMimeTypes = array(
'webm' => 'video/webm',
'ogv' => 'video/ogg',
'mts' => 'video/m2ts',
'mov' => 'video/quicktime',
'm4v' => 'video/m4v'
);
/**
* {@inheritdoc}
*/
public function guess($path)
{
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
if (array_key_exists($extension, static::$videoMimeTypes)) {
return static::$videoMimeTypes[$extension];
}
return null;
}
}