ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
GetId3() by James Heinrich info@ //. geti d3.or gMore...
Public Member Functions | |
__construct ($host, $database, $username, $password, $table='getid3_cache') | |
public: constructor - see top of this file for cache type and cache_options More... | |
clear_cache () | |
public: clear cache More... | |
analyze ($filename) | |
public: analyze file More... | |
Public Member Functions inherited from GetId3\GetId3Core | |
__construct () | |
public: constructor More... | |
version () | |
fread_buffer_size () | |
setOption ($optArray) | |
public: setOption More... | |
openfile ($filename) | |
analyze ($filename) | |
public: analyze file More... | |
GetFileFormatArray () | |
array $format_info More... | |
GetFileFormat (&$filedata, $filename='') | |
CharConvert (&$array, $encoding) | |
HandleAllTags () | |
array $tags More... | |
getHashdata ($algorithm) | |
ChannelsBitratePlaytimeCalculations () | |
CalculateCompressionRatioVideo () | |
CalculateCompressionRatioAudio () | |
CalculateReplayGain () | |
ProcessAudioStreams () | |
GetId3_tempnam () | |
Private Member Functions | |
create_table ($drop=false) | |
private: (re)create sql table More... | |
Private Attributes | |
$cursor | |
$connection | |
GetId3() by James Heinrich info@ //. geti d3.or g
This is a caching extension for GetId3(). It works the exact same way as the GetId3 class, but return cached information very fast
Example: (see also demo.cache.mysql.php in /demo/)
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.mysql.php'; // 5th parameter (tablename) is optional, default is 'getid3_cache' $getID3 = new GetId3_cached_mysql('localhost', 'database', 'username', 'password', 'tablename'); $getID3->encoding = 'UTF-8'; $info1 = $getID3->analyze('file1.flac'); $info2 = $getID3->analyze('file2.wv');
Supported Cache Types (this extension)
SQL Databases:
mysql host, database, username, password
DBM-Style Databases: (use extension.cache.dbm)
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
GetId3\Extension\Cache\Mysql::__construct | ( | $host, | |
$database, | |||
$username, | |||
$password, | |||
$table = 'getid3_cache' |
|||
) |
public: constructor - see top of this file for cache type and cache_options
type | $host | |
type | $database | |
type | $username | |
type | $password | |
type | $table |
Exception |
Definition at line 109 of file Mysql.php.
References $version, GetId3\Extension\Cache\Mysql\clear_cache(), GetId3\Extension\Cache\Mysql\create_table(), and GetId3\GetId3Core\VERSION.
GetId3\Extension\Cache\Mysql::analyze | ( | $filename | ) |
public: analyze file
type | $filename |
Definition at line 160 of file Mysql.php.
References GetId3\GetId3Core\$filename, $result, and time.
GetId3\Extension\Cache\Mysql::clear_cache | ( | ) |
public: clear cache
Definition at line 148 of file Mysql.php.
References GetId3\GetId3Core\VERSION.
Referenced by GetId3\Extension\Cache\Mysql\__construct().
|
private |
private: (re)create sql table
type | $drop |
Definition at line 194 of file Mysql.php.
Referenced by GetId3\Extension\Cache\Mysql\__construct().