\getID3_cached_dbm
This is a caching extension for getID3(). It works the exact same way as the getID3 class, but return cached information very fast
Example:
Normal getID3 usage (example):
require_once 'getid3/getid3.php';
$getID3 = new getID3;
$getID3->encoding = 'UTF-8';
$info1 = $getID3->analyze('file1.flac');
$info2 = $getID3->analyze('file2.wv');
getID3_cached usage:
require_once 'getid3/getid3.php';
require_once 'getid3/getid3/extension.cache.dbm.php';
$getID3 = new getID3_cached('db3', '/tmp/getid3_cache.dbm',
'/tmp/getid3_cache.lock');
$getID3->encoding = 'UTF-8';
$info1 = $getID3->analyze('file1.flac');
$info2 = $getID3->analyze('file2.wv');
Supported Cache Types
SQL Databases: (use extension.cache.mysql)
cache_type cache_options
-------------------------------------------------------------------
mysql host, database, username, password
DBM-Style Databases: (this extension)
cache_type cache_options
-------------------------------------------------------------------
gdbm dbm_filename, lock_filename
ndbm dbm_filename, lock_filename
db2 dbm_filename, lock_filename
db3 dbm_filename, lock_filename
db4 dbm_filename, lock_filename (PHP5 required)
PHP must have write access to both dbm_filename and lock_filename.
Recommended Cache Types
Infrequent updates, many reads any DBM
Frequent updates mysql
Synopsis
- // Inherited constants from getID3
- const VERSION = '1.9.3-20111213';
- const FREAD_BUFFER_SIZE = 32768;
- const ATTACHMENTS_NONE = false;
- const ATTACHMENTS_INLINE = true;
- // Inherited members from getID3
- public string $encoding;
- public string $encoding_id3v1;
- public boolean $option_tag_id3v1;
- public boolean $option_tag_id3v2;
- public boolean $option_tag_lyrics3;
- public boolean $option_tag_apetag;
- public boolean $option_tags_process;
- public boolean $option_tags_html;
- public boolean $option_extra_info;
- public boolean $option_save_attachments;
- public boolean $option_md5_data;
- public boolean $option_md5_data_source;
- public boolean $option_sha1_data;
- public $option_max_2gb_check;
- public integer $option_fread_buffer_size;
- public $filename;
- public $fp;
- public $info;
- protected string $startup_error;
- protected string $startup_warning;
- protected integer $memory_limit;
- public $tempdir;
- // methods
- public void getID3_cached_dbm()
- public void __destruct()
- public void clear_cache()
- public void analyze()
- // Inherited methods from getID3
- public void __construct()
- public void version()
- public void fread_buffer_size()
- public void setOption()
- public void openfile()
- public void analyze()
- public void error()
- public void warning()
- public void CleanUp()
- public void GetFileFormatArray()
- public void GetFileFormat()
- public void CharConvert()
- public void HandleAllTags()
- public void getHashdata()
- public void ChannelsBitratePlaytimeCalculations()
- public void CalculateCompressionRatioVideo()
- public void CalculateCompressionRatioAudio()
- public void CalculateReplayGain()
- public void ProcessAudioStreams()
- public void getid3_tempnam()
- public void saveAttachment()
- public void include_module()
Hierarchy
Extends
Constants
Name | Value |
---|---|
VERSION | '1.9.3-20111213' |
FREAD_BUFFER_SIZE | 32768 |
ATTACHMENTS_NONE | false |
ATTACHMENTS_INLINE | true |
Members
protected
- $memory_limit
- $startup_error
- $startup_warning
public
- $encoding
- $encoding_id3v1
- $filename
- $fp
- $info
- $option_extra_info
- $option_fread_buffer_size
- $option_max_2gb_check
- $option_md5_data
- $option_md5_data_source
- $option_save_attachments
- $option_sha1_data
- $option_tag_apetag
- $option_tag_id3v1
- $option_tag_id3v2
- $option_tag_lyrics3
- $tempdir
Methods
public
Inherited from getID3
public
- CalculateCompressionRatioAudio()
- CalculateCompressionRatioVideo()
- CalculateReplayGain()
- ChannelsBitratePlaytimeCalculations()
- CharConvert()
- CleanUp()
- GetFileFormat()
- GetFileFormatArray()
- HandleAllTags()
- ProcessAudioStreams()
- analyze()
- error()
- fread_buffer_size()
- getHashdata()
- getid3_tempnam()
- include_module()
- openfile()
- saveAttachment()
- setOption()
- version()
- warning()