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

Class: File_XSPF_Track

Source Location: /File_XSPF-0.3.1/File/XSPF/Track.php

Class Overview


This class is the objectification of an XSPF Track element.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 42]
This class is the objectification of an XSPF Track element.


[ Top ]


Method Detail

addExtension   [line 224]

void addExtension( File_XSPF_Extension $extension)

Add an extension element to this track.

This method adds an extension element to this track. This function will only accept instances of the File_XSPF_Extension class, which is documented elsewhere.

  • Access: public

Parameters:

File_XSPF_Extension   $extension   —  an instance of File_XSPF_Extension

[ Top ]

addLink   [line 242]

void addLink( File_XSPF_Link $link)

Add a link element to this track.

This method adds a link element to this track. The $link parameter must be a instance of the File_XSPF_Link class or the method will fail.

  • Access: public

Parameters:

File_XSPF_Link   $link   —  an instance of the File_XSPF_Link class.

[ Top ]

addLocation   [line 263]

bool addLocation( File_XSPF_Location $location, [boolean $append = true])

Add a location element to this track.

This method adds the data of a location element to this track. This is the URL of this track, so probably an audio resource. Local files to be added should be prepended with a file:// scheme.

  • Access: public

Parameters:

File_XSPF_Location   $location   —  the URL of a resource for rendering.
boolean   $append   —  true to append the location, or false to prepend it.

[ Top ]

addMeta   [line 288]

void addMeta( File_XSPF_Meta $meta)

Add a meta element to this track.

This method adds a meta element to this track. The $meta parameter must be an instance of the File_XSPF_Meta class or the method will fail.

  • Access: public

Parameters:

File_XSPF_Meta   $meta   —  an instance of the File_XSPF_Meta class.

[ Top ]

getAlbum   [line 304]

string getAlbum( )

Get the name of the album for this track.

This method returns the name of the collection from which this track comes from. For example, 'OK Computer'.

  • Return: the name of the album for this track.
  • Access: public

[ Top ]

getAnnotation   [line 318]

string getAnnotation( )

Get the human-readable description of this track.

This method returns the human-readable description of this track, which might be notes accompanying this track.

  • Return: a description of this track.
  • Access: public

[ Top ]

getCreator   [line 409]

string getCreator( )

Get the human-readable name of the track author.

This method returns the human-readable name of the entity responsible for this track, which is most commonly the artist, but might be a conductor or arranger.

  • Return: the human-readable name of the entity responsible for this track.
  • Access: public

[ Top ]

getDuration   [line 617]

int getDuration( )

Get the duration of this track in milliseconds.

This method returns the duration of this track in milliseconds, and not seconds, as might be expected.

  • Return: the duration of this track in milliseconds.
  • Access: public

[ Top ]

getIdentifier   [line 347]

File_XSPF_Identifier getIdentifier( )

Get the canonical ID for this track.

This method returns the URN used to correctly identify a resource, which might be a hash, a MusicBrainz identifier, or an ISRC.

  • Return: a URN to identify this track.
  • Access: public

[ Top ]

getImage   [line 529]

string getImage( )

Get the image to display for this track.

This method returns the URL of the image resource to be displayed for the duration of this track. If this image does not exist, clients should fall back to the image specified for the playlist.

  • Return: an image resource URL.
  • Access: public

[ Top ]

getInfo   [line 463]

string getInfo( )

Get the URL of a place where this track may be bought.

This method returns the URL of a place, such as an online shop, where this track may be bought, or somewhere where more information about the track can be found, such as a musical encyclopaedia.

  • Return: the URL of a place for buying this track, or finding out more about it.
  • Access: public

[ Top ]

getLink   [line 514]

array getLink( )

Get an array of File_XSPF_Link instances.

This method returns an array of File_XSPF_Link instances used to define non-XSPF data relevant to this track.

  • Return: an array of File_XSPF_Link instances.
  • Access: public

[ Top ]

getLocation   [line 333]

array getLocation( )

Get an array of locations for this track.

This method returns an array of URLs for the rendering of this track. These URLs will most likely be audio tracks for indepretation by a media player.

  • Return: an array of URLs.
  • Access: public

[ Top ]

getMeta   [line 500]

array getMeta( )

Get an array of File_XSPF_Meta instances.

This method returns an array of File_XSPF_Meta instances used to define metadata resources for this track.

  • Return: an array of File_XSPF_Meta instances.
  • Access: public

[ Top ]

getTitle   [line 361]

string getTitle( )

Get the title of this track.

This method returns the title of this track, which is the human-readable name of the recording, such as 'Planet Telex'.

  • Access: public

[ Top ]

getTrackNumber   [line 581]

int getTrackNumber( )

Get the track number of this track.

This method returns the number representing the offset of this track within a collection of tracks, such as an album.

  • Return: the ordinal position of the track on its collection.
  • Access: public

[ Top ]

setAlbum   [line 567]

void setAlbum( string $album)

Set the name of the album that contains this track.

This method sets the name of an album that contains this track, if indeed this track came from a collection.

  • Access: public

Parameters:

string   $album   —  the collection on which this track appears.

[ Top ]

setAnnotation   [line 442]

boolean setAnnotation( string $annotation)

Set a human-readable comment on this track.

This method sets a human-readable description of this track, which may contain listening notes, or a review of the track.

  • Access: public

Parameters:

string   $annotation   —  a human-readable comment on this track.

[ Top ]

setCreator   [line 426]

void setCreator( string $creator)

Set the human-readable name of the track author.

This method sets the human-readable name of the track author, which might be the original artist, composer, or arranger. For example, 'Radiohead'.

  • Access: public

Parameters:

string   $creator   —  the human-readable name of the entity responsible for this track.

[ Top ]

setDuration   [line 634]

boolean setDuration( int $duration)

Set the duration of this track.

This method sets the duration of this track in milliseconds, and not seconds. This method will use the intval method to cast the supplied duration to an integer.

  • Access: public

Parameters:

int   $duration   —  the length of this track in milliseconds.

[ Top ]

setIdentifier   [line 377]

void setIdentifier( File_XSPF_Identifier $identifier)

Set the identifier object for this track.

This method sets the identifier for this track, which must be an instance of the File_XSPF_Identifier class.

  • Access: public

Parameters:

File_XSPF_Identifier   $identifier   —  an instance of File_XSPF_Identifier

[ Top ]

setImage   [line 546]

bool setImage( string $image)

Set the URL of the image to display for the duration of this track.

This method sets the URL of the image that a content aggregator should display for the duration of this track being played. If this is not set, clients should fall back to the image specified for this playlist.

  • Access: public

Parameters:

string   $image   —  an image resource URL.

[ Top ]

setInfo   [line 480]

void setInfo( string $info)

Set the URL of where to buy this track.

This method sets the URL of a place where this track may be bought, or somewhere where more information about the track can be found. An example might be a page on Amazon.com, or iTunes.

  • Access: public

Parameters:

string   $info   —  a URL where this track may be bought.

[ Top ]

setTitle   [line 393]

void setTitle( string $title)

Set the human-readable title of this track.

This method sets the human-readable title of this track, which is the name by which it is most-often referred to, such as 'Planet Telex'.

  • Access: public

Parameters:

string   $title   —  the human-readable title of this track.

[ Top ]

setTrackNumber   [line 598]

boolean setTrackNumber( int $trackNum)

Set the number of this track.

This method sets the track number for this track. If this track is part of a larger collection, such as an album, this will be the offset at which the track appears on the collection.

  • Access: public

Parameters:

int   $trackNum   —  the ordinal position of the track on its collection.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:47:55 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.