ZenphotoCMS 1.6.1

getID3
in package

Table of Contents

ATTACHMENTS_INLINE  = \true
ATTACHMENTS_NONE  = \false
FREAD_BUFFER_SIZE  = 32768
VERSION  = '1.9.22-202207161647'
$encoding  : string
CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE
$encoding_id3v1  : string
Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'
$encoding_id3v1_autodetect  : bool
ID3v1 should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'Windows-1251' or 'KOI8-R'. If true attempt to detect these encodings, but may return incorrect values for some tags actually in ISO-8859-1 encoding
$filename  : string
Filename of file being analysed.
$fp  : resource
Filepointer to file being analysed.
$info  : array<string|int, mixed>
Result array.
$memory_limit  : int
$option_extra_info  : bool
Calculate additional info such as bitrate, channelmode etc
$option_fread_buffer_size  : int
Read buffer size in bytes
$option_max_2gb_check  : bool|null
Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)
$option_md5_data  : bool
Get MD5 sum of data part - slow
$option_md5_data_source  : bool
Use MD5 of source file if available - only FLAC and OptimFROG
$option_save_attachments  : bool|string
Defaults to true (ATTACHMENTS_INLINE) for backward compatibility
$option_sha1_data  : bool
Get SHA1 sum of data part - slow
$option_tag_apetag  : bool
Read and process APE tags
$option_tag_id3v1  : bool
Read and process ID3v1 tags
$option_tag_id3v2  : bool
Read and process ID3v2 tags
$option_tag_lyrics3  : bool
Read and process Lyrics3 tags
$option_tags_html  : bool
Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities
$option_tags_process  : bool
Copy tags to root key 'tags' and encode to $this->encoding
$options_archive_gzip_parse_contents  : bool
archive.gzip Optional file list - disable for speed.
$options_archive_rar_use_php_rar_extension  : bool
archive.rar if true use PHP RarArchive extension, if false (non-extension parsing not yet written in getID3)
$options_audio_midi_scanwholefile  : bool
audio.midi if false only parse most basic information, much faster for some files but may be inaccurate
$options_audio_mp3_allow_bruteforce  : bool
audio.mp3 Forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, unrecommended, but may provide data from otherwise-unusable files.
$options_audio_mp3_mp3_valid_check_frames  : int
audio.mp3 number of frames to scan to determine if MPEG-audio sequence is valid Lower this number to 5-20 for faster scanning Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams
$options_audio_wavpack_quick_parsing  : bool
audio.wavpack Avoid scanning all frames (break after finding ID_RIFF_HEADER and ID_CONFIG_BLOCK, significantly faster for very large files but other data may be missed
$options_audiovideo_flv_max_frames  : int
audio-video.flv Break out of the loop if too many frames have been scanned; only scan this many if meta frame does not contain useful duration.
$options_audiovideo_matroska_hide_clusters  : bool
audio-video.matroska If true, do not return information about CLUSTER chunks, since there's a lot of them and they're not usually useful [default: TRUE].
$options_audiovideo_matroska_parse_whole_file  : bool
audio-video.matroska True to parse the whole file, not only header [default: FALSE].
$options_audiovideo_quicktime_ParseAllPossibleAtoms  : bool
audio-video.quicktime return all parsed data from all atoms if true, otherwise just returned parsed metadata
$options_audiovideo_quicktime_ReturnAtomData  : bool
audio-video.quicktime return all parsed data from all atoms if true, otherwise just returned parsed metadata
$options_audiovideo_swf_ReturnAllTagData  : bool
audio-video.swf return all parsed tags if true, otherwise do not return tags not parsed by getID3
$options_graphic_bmp_ExtractData  : bool
graphic.bmp return image data
$options_graphic_bmp_ExtractPalette  : bool
graphic.bmp return BMP palette
$options_graphic_png_max_data_bytes  : int
graphic.png If data chunk is larger than this do not read it completely (getID3 only needs the first few dozen bytes for parsing).
$options_misc_pdf_returnXREF  : bool
misc.pdf return full details of PDF Cross-Reference Table (XREF)
$options_misc_torrent_max_torrent_filesize  : int
misc.torrent Assume all .torrent files are less than 1MB and just read entire thing into memory for easy processing.
$tempdir  : string
$startup_error  : string
$startup_warning  : string
__construct()  : mixed
analyze()  : array<string|int, mixed>
analyze file
CalculateCompressionRatioAudio()  : bool
CalculateCompressionRatioVideo()  : bool
CalculateReplayGain()  : bool
ChannelsBitratePlaytimeCalculations()  : mixed
CharConvert()  : mixed
Converts array to $encoding charset from $this->encoding.
CopyTagsToComments()  : bool
Calls getid3_lib::CopyTagsToComments() but passes in the option_tags_html setting from this instance of getID3
error()  : array<string|int, mixed>
Error handling.
fread_buffer_size()  : int
GetFileFormat()  : mixed|false
GetFileFormatArray()  : array<string|int, mixed>
Return array containing information about all supported formats.
getHashdata()  : array<string|int, mixed>|bool
getid3_tempnam()  : string|bool
HandleAllTags()  : bool
include_module()  : bool
is_writable()  : bool
openfile()  : bool
ProcessAudioStreams()  : bool
setOption()  : bool
version()  : string
warning()  : bool
Warning handling.
CleanUp()  : bool

Constants

ATTACHMENTS_INLINE

public mixed ATTACHMENTS_INLINE = \true

ATTACHMENTS_NONE

public mixed ATTACHMENTS_NONE = \false

FREAD_BUFFER_SIZE

public mixed FREAD_BUFFER_SIZE = 32768

VERSION

public mixed VERSION = '1.9.22-202207161647'

Properties

$encoding

CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE

public string $encoding = 'UTF-8'

$encoding_id3v1

Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'

public string $encoding_id3v1 = 'ISO-8859-1'

$encoding_id3v1_autodetect

ID3v1 should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'Windows-1251' or 'KOI8-R'. If true attempt to detect these encodings, but may return incorrect values for some tags actually in ISO-8859-1 encoding

public bool $encoding_id3v1_autodetect = \false

$filename

Filename of file being analysed.

public string $filename

$fp

Filepointer to file being analysed.

public resource $fp

$info

Result array.

public array<string|int, mixed> $info

$memory_limit

public int $memory_limit = 0

$option_extra_info

Calculate additional info such as bitrate, channelmode etc

public bool $option_extra_info = \true

$option_fread_buffer_size

Read buffer size in bytes

public int $option_fread_buffer_size = 32768

$option_max_2gb_check

Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)

public bool|null $option_max_2gb_check

$option_md5_data

Get MD5 sum of data part - slow

public bool $option_md5_data = \false

$option_md5_data_source

Use MD5 of source file if available - only FLAC and OptimFROG

public bool $option_md5_data_source = \false

$option_save_attachments

Defaults to true (ATTACHMENTS_INLINE) for backward compatibility

public bool|string $option_save_attachments = \true

$option_sha1_data

Get SHA1 sum of data part - slow

public bool $option_sha1_data = \false

$option_tag_apetag

Read and process APE tags

public bool $option_tag_apetag = \true

$option_tag_id3v1

Read and process ID3v1 tags

public bool $option_tag_id3v1 = \true

$option_tag_id3v2

Read and process ID3v2 tags

public bool $option_tag_id3v2 = \true

$option_tag_lyrics3

Read and process Lyrics3 tags

public bool $option_tag_lyrics3 = \true

$option_tags_html

Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities

public bool $option_tags_html = \true

$option_tags_process

Copy tags to root key 'tags' and encode to $this->encoding

public bool $option_tags_process = \true

$options_archive_gzip_parse_contents

archive.gzip Optional file list - disable for speed.

public bool $options_archive_gzip_parse_contents = \false

Decode gzipped files, if possible, and parse recursively (.tar.gz for example).

$options_archive_rar_use_php_rar_extension

archive.rar if true use PHP RarArchive extension, if false (non-extension parsing not yet written in getID3)

public bool $options_archive_rar_use_php_rar_extension = \true

$options_audio_midi_scanwholefile

audio.midi if false only parse most basic information, much faster for some files but may be inaccurate

public bool $options_audio_midi_scanwholefile = \true

$options_audio_mp3_allow_bruteforce

audio.mp3 Forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, unrecommended, but may provide data from otherwise-unusable files.

public bool $options_audio_mp3_allow_bruteforce = \false

$options_audio_mp3_mp3_valid_check_frames

audio.mp3 number of frames to scan to determine if MPEG-audio sequence is valid Lower this number to 5-20 for faster scanning Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams

public int $options_audio_mp3_mp3_valid_check_frames = 50

$options_audio_wavpack_quick_parsing

audio.wavpack Avoid scanning all frames (break after finding ID_RIFF_HEADER and ID_CONFIG_BLOCK, significantly faster for very large files but other data may be missed

public bool $options_audio_wavpack_quick_parsing = \false

$options_audiovideo_flv_max_frames

audio-video.flv Break out of the loop if too many frames have been scanned; only scan this many if meta frame does not contain useful duration.

public int $options_audiovideo_flv_max_frames = 100000

$options_audiovideo_matroska_hide_clusters

audio-video.matroska If true, do not return information about CLUSTER chunks, since there's a lot of them and they're not usually useful [default: TRUE].

public bool $options_audiovideo_matroska_hide_clusters = \true

$options_audiovideo_matroska_parse_whole_file

audio-video.matroska True to parse the whole file, not only header [default: FALSE].

public bool $options_audiovideo_matroska_parse_whole_file = \false

$options_audiovideo_quicktime_ParseAllPossibleAtoms

audio-video.quicktime return all parsed data from all atoms if true, otherwise just returned parsed metadata

public bool $options_audiovideo_quicktime_ParseAllPossibleAtoms = \false

$options_audiovideo_quicktime_ReturnAtomData

audio-video.quicktime return all parsed data from all atoms if true, otherwise just returned parsed metadata

public bool $options_audiovideo_quicktime_ReturnAtomData = \false

$options_audiovideo_swf_ReturnAllTagData

audio-video.swf return all parsed tags if true, otherwise do not return tags not parsed by getID3

public bool $options_audiovideo_swf_ReturnAllTagData = \false

$options_graphic_bmp_ExtractData

graphic.bmp return image data

public bool $options_graphic_bmp_ExtractData = \false

$options_graphic_bmp_ExtractPalette

graphic.bmp return BMP palette

public bool $options_graphic_bmp_ExtractPalette = \false

$options_graphic_png_max_data_bytes

graphic.png If data chunk is larger than this do not read it completely (getID3 only needs the first few dozen bytes for parsing).

public int $options_graphic_png_max_data_bytes = 10000000

$options_misc_pdf_returnXREF

misc.pdf return full details of PDF Cross-Reference Table (XREF)

public bool $options_misc_pdf_returnXREF = \false

$options_misc_torrent_max_torrent_filesize

misc.torrent Assume all .torrent files are less than 1MB and just read entire thing into memory for easy processing.

public int $options_misc_torrent_max_torrent_filesize = 1048576

Override this value if you need to process files larger than 1MB

$tempdir

public string $tempdir = \GETID3_TEMP_DIR

$startup_error

protected string $startup_error = ''

$startup_warning

protected string $startup_warning = ''

Methods

analyze()

analyze file

public analyze(string $filename[, int $filesize = null ][, string $original_filename = '' ][, resource $fp = null ]) : array<string|int, mixed>
Parameters
$filename : string
$filesize : int = null
$original_filename : string = ''
$fp : resource = null
Return values
array<string|int, mixed>

CalculateCompressionRatioAudio()

public CalculateCompressionRatioAudio() : bool
Return values
bool

CalculateCompressionRatioVideo()

public CalculateCompressionRatioVideo() : bool
Return values
bool

CalculateReplayGain()

public CalculateReplayGain() : bool
Return values
bool

ChannelsBitratePlaytimeCalculations()

public ChannelsBitratePlaytimeCalculations() : mixed
Return values
mixed

CharConvert()

Converts array to $encoding charset from $this->encoding.

public CharConvert(array<string|int, mixed> &$array, string $encoding) : mixed
Parameters
$array : array<string|int, mixed>
$encoding : string
Return values
mixed

CopyTagsToComments()

Calls getid3_lib::CopyTagsToComments() but passes in the option_tags_html setting from this instance of getID3

public CopyTagsToComments(array<string|int, mixed> &$ThisFileInfo) : bool
Parameters
$ThisFileInfo : array<string|int, mixed>
Return values
bool

error()

Error handling.

public error(string $message) : array<string|int, mixed>
Parameters
$message : string
Return values
array<string|int, mixed>

fread_buffer_size()

public fread_buffer_size() : int
Return values
int

GetFileFormat()

public GetFileFormat(string &$filedata[, string $filename = '' ]) : mixed|false
Parameters
$filedata : string
$filename : string = ''
Return values
mixed|false

GetFileFormatArray()

Return array containing information about all supported formats.

public GetFileFormatArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHashdata()

public getHashdata(string $algorithm) : array<string|int, mixed>|bool
Parameters
$algorithm : string
Return values
array<string|int, mixed>|bool

getid3_tempnam()

public getid3_tempnam() : string|bool
Return values
string|bool

HandleAllTags()

public HandleAllTags() : bool
Return values
bool

include_module()

public include_module(string $name) : bool
Parameters
$name : string
Tags
throws
getid3_exception
Return values
bool

is_writable()

public static is_writable(string $filename) : bool
Parameters
$filename : string
Return values
bool

openfile()

public openfile(string $filename[, int $filesize = null ][, resource $fp = null ]) : bool
Parameters
$filename : string
$filesize : int = null
$fp : resource = null
Tags
throws
getid3_exception
Return values
bool

ProcessAudioStreams()

public ProcessAudioStreams() : bool
Return values
bool

setOption()

public setOption(array<string|int, mixed> $optArray) : bool
Parameters
$optArray : array<string|int, mixed>
Return values
bool

version()

public version() : string
Return values
string

warning()

Warning handling.

public warning(string $message) : bool
Parameters
$message : string
Return values
bool

CleanUp()

private CleanUp() : bool
Return values
bool

Search results