|
ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g // More...
Inheritance diagram for getID3_cached_sqlite3:
Collaboration diagram for getID3_cached_sqlite3:Public Member Functions | |
| __construct ($table='getid3_cache', $hide=false) | |
| __construct() More... | |
| __destruct () | |
| close the database connection More... | |
| analyze ($filename, $filesize=null, $original_filename='') | |
| analyze file and cache them, if cached pull from the db More... | |
| get_cached_dir ($dir) | |
| get cached directory More... | |
| __get ($name) | |
| use the magical __get() for sql queries More... | |
Public Member Functions inherited from getID3 | |
| getID3 () | |
| setOption ($optArray) | |
| analyze ($filename) | |
| error ($message) | |
| warning ($message) | |
| CleanUp () | |
| GetFileFormatArray () | |
| GetFileFormat (&$filedata, $filename='') | |
| CharConvert (&$array, $encoding) | |
| HandleAllTags () | |
| getHashdata ($algorithm) | |
| ChannelsBitratePlaytimeCalculations () | |
| CalculateCompressionRatioVideo () | |
| CalculateCompressionRatioAudio () | |
| CalculateReplayGain () | |
| ProcessAudioStreams () | |
| getid3_tempnam () | |
| __construct () | |
| version () | |
| fread_buffer_size () | |
| setOption ($optArray) | |
| openfile ($filename, $filesize=null) | |
| analyze ($filename, $filesize=null, $original_filename='') | |
| error ($message) | |
| warning ($message) | |
| GetFileFormatArray () | |
| GetFileFormat (&$filedata, $filename='') | |
| CharConvert (&$array, $encoding) | |
| HandleAllTags () | |
| getHashdata ($algorithm) | |
| ChannelsBitratePlaytimeCalculations () | |
| CalculateCompressionRatioVideo () | |
| CalculateCompressionRatioAudio () | |
| CalculateReplayGain () | |
| ProcessAudioStreams () | |
| getid3_tempnam () | |
| include_module ($name) | |
Private Member Functions | |
| clear_cache () | |
| clear the cache @access private More... | |
| create_table () | |
| create data base table this is almost the same as MySQL, with the exception of the dirname being added More... | |
Private Attributes | |
| $db | |
| $table | |
| table to use for caching More... | |
Additional Inherited Members | |
Data Fields inherited from getID3 | |
| $encoding = 'ISO-8859-1' | |
| $encoding_id3v1 = 'ISO-8859-1' | |
| $tempdir = '*' | |
| $option_tag_id3v1 = true | |
| $option_tag_id3v2 = true | |
| $option_tag_lyrics3 = true | |
| $option_tag_apetag = true | |
| $option_tags_process = true | |
| $option_tags_html = true | |
| $option_extra_info = true | |
| $option_md5_data = false | |
| $option_md5_data_source = false | |
| $option_sha1_data = false | |
| $option_max_2gb_check = true | |
| $filename | |
| $option_save_attachments = true | |
| $option_fread_buffer_size = 32768 | |
| $fp | |
| $info | |
| $memory_limit = 0 | |
| const | VERSION = '1.9.10-20150914' |
| const | FREAD_BUFFER_SIZE = 32768 |
| const | ATTACHMENTS_NONE = false |
| const | ATTACHMENTS_INLINE = true |
Protected Attributes inherited from getID3 | |
| $startup_error = '' | |
| $startup_warning = '' | |
getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //
// // This is a caching extension for getID3(). It works the exact same way as the getID3 class, but return cached information much faster
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/extension.cache.sqlite3.php'; // all parameters are optional, defaults are: $getID3 = new getID3_cached_sqlite3($table='getid3_cache', $hide=FALSE); $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
sqlite3 table='getid3_cache', hide=false (PHP5)
*** database file will be stored in the same directory as this script, *** webserver must have write access to that directory! *** set $hide to TRUE to prefix db file with .ht to pervent access from web client *** this is a default setting in the Apache configuration:
The following lines prevent .htaccess and .htpasswd files from being viewed by Web clients.
<Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files>
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
IMHO this is still a bit slow, I'm using this with MP4/MOV/ M4v files there is a plan to add directory scanning and analyzing to make things work much faster
Definition at line 92 of file extension.cache.sqlite3.php.
| getID3_cached_sqlite3::__construct | ( | $table = 'getid3_cache', |
|
$hide = false |
|||
| ) |
| string | $table | holds name of sqlite table |
Definition at line 99 of file extension.cache.sqlite3.php.
References $db, $file, $result, $table, clear_cache(), create_table(), and getID3\VERSION.
Here is the call graph for this function:| getID3_cached_sqlite3::__destruct | ( | ) |
| getID3_cached_sqlite3::__get | ( | $name | ) |
use the magical __get() for sql queries
access as easy as $this->{case name}, returns NULL if query is not found
Definition at line 238 of file extension.cache.sqlite3.php.
| getID3_cached_sqlite3::analyze | ( | $filename, | |
$filesize = null, |
|||
$original_filename = '' |
|||
| ) |
analyze file and cache them, if cached pull from the db
| type | $filename |
Reimplemented from getID3.
Definition at line 162 of file extension.cache.sqlite3.php.
References $db, getID3\$filename, $res, and $result.
|
private |
clear the cache @access private
Definition at line 145 of file extension.cache.sqlite3.php.
References $db, and getID3\VERSION.
Referenced by __construct().
Here is the caller graph for this function:
|
private |
create data base table this is almost the same as MySQL, with the exception of the dirname being added
Definition at line 204 of file extension.cache.sqlite3.php.
References $db.
Referenced by __construct().
Here is the caller graph for this function:| getID3_cached_sqlite3::get_cached_dir | ( | $dir | ) |
get cached directory
This function is not in the MySQL extention, it's ment to speed up requesting multiple files which is ideal for podcasting, playlists, etc.
@access public
| string | $dir | directory to search the cache database for |
Definition at line 220 of file extension.cache.sqlite3.php.
|
private |
Definition at line 132 of file extension.cache.sqlite3.php.
Referenced by __construct(), __destruct(), analyze(), clear_cache(), create_table(), and get_cached_dir().
|
private |
table to use for caching
Definition at line 138 of file extension.cache.sqlite3.php.
Referenced by __construct().