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

Class: Net_MPD_Common

Source Location: /Net_MPD-1.0.2/Net/MPD/Common.php

Class Overview


API for the common peices of Music Player Daemon commands


Author(s):

Version:

  • CVS: $ID:$

Copyright:

  • 2006 Graham Christensen

Variables

Methods


Child classes:

Net_MPD_Playlist
API for the playlist portion of Music Player Daemon commands
Net_MPD_Playback
API for the playback portion of Music Player Daemon commands
Net_MPD_Database
API for the database portion of Music Player Daemon commands
Net_MPD_Admin
Music Player Daemon API

Inherited Variables

Inherited Methods


Class Details

[line 47]
API for the common peices of Music Player Daemon commands

Used for basic interaction and output handeling, as well as several standard commands.



[ Top ]


Class Variables

$_commands = array()

[line 75]

  • Access: protected

Type:   mixed


[ Top ]

$_errors = array()

[line 73]

  • Access: protected

Type:   mixed


[ Top ]

$_output = array()

[line 76]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 89]

void __construct( [$host $host = 'localhost'], [$port $port = 6600], [$password $password = null])

Set connection params

Parameters:

$host   $host   —  host to connect to, (default: localhost)
$port   $port   —  port to connec through, (default: 6600)
$password   $password   —  password to send, (default: null)

[ Top ]

connect   [line 103]

bool connect( )

Connect to MPD
  • Access: public

[ Top ]

disconnect   [line 151]

bool disconnect( )

Disconnect from MPD
  • Access: public

[ Top ]

getCommands   [line 438]

array getCommands( )

Used to discover which commands are available
  • Return: (null on no functions being available
  • Access: public

[ Top ]

getErrorData   [line 226]

array getErrorData( )

Get the current error data
  • Return: of error data
  • Access: public

[ Top ]

getErrors   [line 410]

array getErrors( )

A method to access errors
  • Access: public

[ Top ]

getNotCommands   [line 422]

array getNotCommands( )

Used to discover commands that are not available
  • Return: (null on no functions not being available)
  • Access: public

[ Top ]

getStats   [line 466]

array getStats( )

Get various statistics about the MPD server
  • Access: public

[ Top ]

getStatus   [line 482]

array getStatus( )

Get the status of the MPD server
  • Access: public

[ Top ]

isConnected   [line 136]

bool isConnected( )

Check connection status
  • Access: public

[ Top ]

parseOutput   [line 277]

array parseOutput( $input $input, [$style $style = 0])

Parse MPD output on a line-by-line basis creating output that is easy to work with
  • Access: public

Parameters:

$input   $input   —  array of input from MPD
$style   $style   —  int style number,'0' for the "intelligent" sorting

[ Top ]

ping   [line 454]

bool ping( )

Ping the MPD server to keep the connection running
  • Access: public

[ Top ]

read   [line 192]

array read( )

Read data from the socket
  • Return: of raw output

[ Top ]

runCommand   [line 242]

array runCommand( $command $command, [$args $args = array()], [$parse $parse = 0])

Run command
  • Return: of server output
  • Access: public

Parameters:

$command   $command   —  string a command to be executed through MPD
$args   $args   —  mixed string for a single argument, array for multiple
$parse   $parse   —  mixed false to parse the output, int for parse style

[ Top ]

write   [line 169]

bool write( $command $data)

Write data to the socket

Parameters:

$command   $data   —  string data to be sent

[ Top ]


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