Plex_Client_Controller_Navigation
class Plex_Client_Controller_Navigation extends Plex_Client_ControllerAbstract
Represents a Plex client on the network.
Constants
| DEFAULT_PORT |
The default port on which a Plex client listens. |
| TYPE_NAVIGATION |
String representing the navigation controller type. |
| TYPE_PLAYBACK |
String representing the playback controller type. |
| TYPE_APPLICATION |
String representing the application controller type. |
Properties
| protected string | $name | The name of the Plex machine on the network. | from Plex_MachineAbstract |
| protected string | $address | The IP address of the Plex machine on the network. | from Plex_MachineAbstract |
| protected integer | $port | The port on which the Plex machine is listening. Typically 32400 for servers and 3000 for clients. | from Plex_MachineAbstract |
| protected string | $token | The token of the Plex machine on the network. | from Plex_MachineAbstract |
Methods
Returns the base URL, which will be standard for all requests made to the Plex machine.
Typically the useful data returned by a Plex machine will containted in XML attributes. This allows a set of XML nodes to be passed and all the attribues extracted and returned as an associated array.
Utilizes php-curl to send a request to the passed URL and returns an XML document reprentation of the returned content.
Universal function so any method belonging to a child class of a Plex machine can discover which function called it. This is used mainly for some of our polymorphic requests as the calling function can tell us what type of item is being requested.
Sets up our Plex client using the minimum amount of data required to interact.
Returns the navigation controller.
Returns the playback controller.
Returns the application controller.
Sets the mac address of the Plex client.
Returns the version of the Plex software the Plex client is running.
Sets the version of the Plex software the Plex client is running.
Using the calling class and function builds and calls the URL for the Plex client controller command.
Static factory method for instantiating and returning a child controller class.
Executes the move up command.
Executes the move down command.
Executes the move left command.
Executes the move right command.
Executes the page up command.
Executes the page down command.
Executes the next letter command.
Executes the previous letter command.
Executes the select command.
Executes the back command.
Executes the context menu command.
Executes the toggle OSD command.
Details
in Plex_MachineAbstract at line 78
protected string
getBaseUrl()
Returns the base URL, which will be standard for all requests made to the Plex machine.
in Plex_MachineAbstract at line 102
protected array
xmlAttributesToArray(SimpleXMLElement $xml, integer $pass = 0)
Typically the useful data returned by a Plex machine will containted in XML attributes. This allows a set of XML nodes to be passed and all the attribues extracted and returned as an associated array.
in Plex_MachineAbstract at line 149
protected array
makeCall(string $url)
Utilizes php-curl to send a request to the passed URL and returns an XML document reprentation of the returned content.
in Plex_MachineAbstract at line 196
protected string
getCallingFunction(integer $depth = 2)
Universal function so any method belonging to a child class of a Plex machine can discover which function called it. This is used mainly for some of our polymorphic requests as the calling function can tell us what type of item is being requested.
in Plex_Client at line 90
void
__construct(string $name, string $address, integer $port, string $token)
Sets up our Plex client using the minimum amount of data required to interact.
in Plex_Client at line 131
Plex_Client_Controller_Navigation
getNavigationController()
Returns the navigation controller.
in Plex_Client at line 146
Plex_Client_Controller_Playback
getPlaybackController()
Returns the playback controller.
in Plex_Client at line 161
Plex_Client_Controller_Application
getApplicationController()
Returns the application controller.
in Plex_Client at line 175
string
getName()
Returns the Plex client's name.
in Plex_Client at line 187
string
getAddress()
Returns the Plex client's IP address.
in Plex_Client at line 199
integer
getPort()
Returns the port on which the Plex client listens.
in Plex_Client at line 209
string
getToken()
Returns the token on which the Plex machine listens.
in Plex_Client at line 221
string
getHost()
Returns the hostname of the Plex client.
in Plex_Client at line 235
void
setHost(string $host)
Sets the hostname of the Plex client.
in Plex_Client at line 247
string
getMachineIdentifier()
Returns the mac address of the Plex client.
in Plex_Client at line 261
void
setMachineIdentifier(string $machineIdentifier)
Sets the mac address of the Plex client.
in Plex_Client at line 274
string
getVersion()
Returns the version of the Plex software the Plex client is running.
in Plex_Client at line 289
void
setVersion(string $version)
Sets the version of the Plex software the Plex client is running.
in Plex_Client at line 301
protected Plex_Server
getServer()
Returns the server that registered the client.
in Plex_Client at line 315
void
setServer(Plex_Server $server)
Sets the server that registered the client.
in Plex_Client_ControllerAbstract at line 96
protected void
executeCommand(array $params = array())
Using the calling class and function builds and calls the URL for the Plex client controller command.
in Plex_Client_ControllerAbstract at line 126
static Plex_Client_ControllerAbstract
factory(string $type, string $name, string $address, integer $port, string $token, Plex_Server $server)
Static factory method for instantiating and returning a child controller class.
at line 51
void
moveUp()
Executes the move up command.
at line 63
void
moveDown()
Executes the move down command.
at line 75
void
moveLeft()
Executes the move left command.
at line 87
void
moveRight()
Executes the move right command.
at line 99
void
pageUp()
Executes the page up command.
at line 111
void
pageDown()
Executes the page down command.
at line 123
void
nextLetter()
Executes the next letter command.
at line 135
void
previousLetter()
Executes the previous letter command.
at line 147
void
select()
Executes the select command.
at line 159
void
back()
Executes the back command.
at line 171
void
contextMenu()
Executes the context menu command.
at line 183
void
toggleOSD()
Executes the toggle OSD command.