MediaSearch_Id3
[ class tree: MediaSearch_Id3 ] [ index: MediaSearch_Id3 ] [ all elements ]

Class: MediaSearch_Id3_Tag

Source Location: /MediaSearch/Id3/Tag.php

Class Overview


Gives read access to the ID3 tags of a mp3 file.


Author(s):

Copyright:

  • Copyright (c) 2009 Sven Strittmatter

Constants

Methods



Class Details

[line 38]
Gives read access to the ID3 tags of a mp3 file.



Tags:

copyright:  Copyright (c) 2009 Sven Strittmatter
uses:  MediaSearch_Id3_Exception


[ Top ]


Class Methods


static method isMp3 [line 103]

static bool isMp3( string $fileName)

Checks the given file name string if it has the file name extension 'mp3'.



Tags:

access:  public


Parameters:

string   $fileName  

[ Top ]

constructor __construct [line 82]

MediaSearch_Id3_Tag __construct( $fileInfo)

Gather the tag version from the file.



Tags:

throws:  MediaSearch_Id3_Exception If the given file info object isnt a mp3.
access:  public


Parameters:

SplFileInfo   $fileInfo  

[ Top ]

method get [line 146]

string get( string $name)

Returns a ID3 tag by its name. If the ta gis not setted or does not exists this method returns null.



Tags:

access:  public


Parameters:

string   $name  

[ Top ]

method getVersion [line 114]

int getVersion( )

Returns the version of ID3 tags this file has.

Attend that a file can have version 1.x and 2.x tags together!




Tags:

access:  public


[ Top ]

method isVersion [line 134]

bool isVersion( int $int)

Tells you if this file is of a version.

Example:

  1.   // ...
  2.   $tag new MediaSearch_Id3_Tag($fileInfo);
  3.   // ...
  4.   if ($tag->isVersion(MediaSearch_Id3_Tag::VERSION_2)) {
  5.   }




Tags:

access:  public


Parameters:

int   $int  

[ Top ]

method __get [line 165]

string __get( string $name)



Tags:

see:  MediaSearch_Id3_Tag::get()
access:  public


Parameters:

string   $name  

[ Top ]

method __set [line 177]

void __set( atring $name)

Throws permanent a BadEthodCallException because this object is imutable.



Tags:

throws:  BadEthodCallException
access:  public


Parameters:

atring   $name  

[ Top ]


Class Constants

VERSION_1 =  ID3_V1_0

[line 42]

ID3 Version 1.0


[ Top ]

VERSION_1_1 =  ID3_V1_1

[line 46]

ID3 Version 1.1


[ Top ]

VERSION_2 =  ID3_V2

[line 50]

ID3 Version 2.0


[ Top ]



Documentation generated on Mon, 17 Aug 2009 14:54:11 +0200 by phpDocumentor 1.4.2