SqueezePHPAPI
[ class tree: SqueezePHPAPI ] [ index: SqueezePHPAPI ] [ all elements ] [ doc index ]

Class: SqueezeConnection

Source Location: /lib/class.SqueezeConnection.php

Class Overview

SqueezeConnection


Author(s):

Copyright:

Variables

Methods


 

Class Details

[line 27]
SqueezeConnection

SqueezeCenter CLI socket connection interface


Tags:

author:  David Broz <db-dev__AT__0r9.org>
copyright:  (c) 2009 by David Broz - Disorganization Zurich, Switzerland
license:  GNU General Public License v2


[ Top ]


Class Variables

$buffer =  

[line 84]

buffer

Connection Buffer


Tags:

access:  public

Type:   string


[ Top ]

$connected =  

[line 101]

connected

Connection State


Tags:

access:  public

Type:   boolean


[ Top ]

$errors =  

[line 117]

errors

Error Stack


Tags:

access:  public

Type:   array


[ Top ]

$lastReadBuffer =  

[line 93]

lastReadBuffer

Connection Last Read Buffer


Tags:

access:  public

Type:   string


[ Top ]

$security_enabled =  

[line 109]

security_enabled

Security enabled state


Tags:

access:  public

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 125]

SqueezeConnection __construct( [ $hostname = "localhost"], [ $port = "9090"], [ $username = ""], [ $password = ""])

SqueezeConnection (constructor)



Parameters:

   $hostname  
   $port  
   $username  
   $password  

[ Top ]

destructor __destruct [line 777]

void __destruct( )

SqueezeConnection (destructor)



[ Top ]

method argsToTaggedParams [line 709]

string argsToTaggedParams( $tags, $arguments)

argsToTaggedParams

Converts matched tags/function argument pairs to tagged parameters.


Tags:

access:  public


Parameters:

array   $tags  
array   $arguments  

[ Top ]

method arrayQuery [line 469]

array arrayQuery( [string $command = ""])

intQuery

Executes a CLI command and returns a associative array response.
(Used for tagged responses)


Tags:

access:  public


Parameters:

string   $command  

[ Top ]

method arrayToTaggedParams [line 687]

string arrayToTaggedParams( $params)

arrayToTaggedParams

Converts an associative array to tagged parameters.


Tags:

access:  public


Parameters:

array   $params  

[ Top ]

method boolQuery [line 443]

boolean boolQuery( [string $command = ""])

boolQuery

Executes a CLI command and returns a boolean response.


Tags:

access:  public


Parameters:

string   $command  

[ Top ]

method clearBuffer [line 729]

void clearBuffer( )

clearBuffer

Clears the connection buffer.


Tags:

access:  public


[ Top ]

method cmd [line 389]

string cmd( [string $command = ""])

cmd

Execute CLI command - returns the raw response from SqueezeCenter socket.


Tags:

return:  (boolean false on failure)
access:  public


Parameters:

string   $command  

[ Top ]

method connect [line 218]

boolean connect( )

connect

Establish connection to SqueezeCenter CLI socket


Tags:

return:  (success)
access:  public


[ Top ]

method disconnect [line 741]

boolean disconnect( )

disconnect

Disconnect from SqueezeCenter CLI socket


Tags:

return:  (success)
access:  public


[ Top ]

method getHostname [line 181]

string getHostname( )

getHostname

Gets the connection hostname


Tags:

access:  public


[ Top ]

method getLastError [line 763]

string getLastError( )

getLastError

Returns the last connection error.


Tags:

access:  public


[ Top ]

method getPort [line 206]

string getPort( )

getPort

Gets the connection port


Tags:

access:  public


[ Top ]

method intQuery [line 456]

integer intQuery( [string $command = ""])

intQuery

Executes a CLI command and returns a integer response.


Tags:

access:  public


Parameters:

string   $command  

[ Top ]

method pingQuery [line 639]

boolean pingQuery( [string $command = ""])

pingQuery

Executes a CLI command and returns success if the command equates the output.
(Used for setting direct queries)


Tags:

return:  (success)
access:  public


Parameters:

string   $command  

[ Top ]

method searchQuery [line 558]

array searchQuery( [string $command = ""])

searchQuery

Executes a CLI command and returns a associative array response.
(Used for database search responses)


Tags:

access:  public


Parameters:

string   $command  

[ Top ]

method setHostname [line 170]

void setHostname( [string $hostname = ""])

setHostname

Sets connection hostname


Tags:

access:  public


Parameters:

string   $hostname  

[ Top ]

method setPassword [line 157]

void setPassword( [string $password = ""])

setPassword

Sets connection password


Tags:

access:  public


Parameters:

string   $password  

[ Top ]

method setPort [line 194]

void setPort( [string $port = ""])

setPort

Sets connection port


Tags:

access:  public


Parameters:

string   $port  

[ Top ]

method setUsername [line 144]

void setUsername( [string $username = ""])

setUsername

Sets connection username


Tags:

access:  public


Parameters:

string   $username  

[ Top ]

method splitQuery [line 489]

array splitQuery( [string $command = ""], [string $delimiter = ""], [string $keyname = ""])

splitQuery

Executes a CLI command and returns a associative array response, but splits repetitive parts by delimiter.
(Used for repetitive tagged responses)


Tags:

access:  public


Parameters:

string   $command  
string   $delimiter  
string   $keyname  

[ Top ]

method stringQuery [line 422]

string stringQuery( [string $command = ""], [ $urldecode = true])

stringQuery

Executes a CLI command and returns a string response.


Tags:

access:  public


Parameters:

string   $command  
   $urldecode  

[ Top ]

method taggedParamsToArray [line 654]

array taggedParamsToArray( string $params)

taggedParamsToArray

Converts tagged parameters to associative array.


Tags:

access:  public


Parameters:

string   $params  

[ Top ]


Documentation generated on Wed, 16 Sep 2009 18:08:27 +0200 by phpDocumentor 1.4.2