* @license PHP License * @package WB * @subpackage vfs */ WBClass::load('WBVFS_Mime'); /** * Virtual File System: Mime_Audio * * Mime handler for audio files. Default file name extension is "mp3" * Also all audio files are guessed to be mp3s * * * @version 0.2.0 * @package WB * @subpackage vfs */ class WBVFS_Mime_Audio extends WBVFS_Mime { /** * file name extension * @var string */ protected $extension = 'mp3'; /** * get information about this file * * @return array */ public function getInfo() { return $this->info; } /** * import file * */ public function import() { } /** * get file name of requested file * * @param bool $redirect whether to redirect * @return string */ protected function doGetRequestedFile(&$redirect) { $this->file = $this->vfile->getPath(); $name = explode('.', $this->vfile->getName()); $ext = array_pop($name); if ($ext == $this->extension) { $this->extension = null; } return $this->file; } }