Plex_MachineAbstract
abstract class Plex_MachineAbstract implements Plex_MachineInterface
Abstract base class containing methods and members for all Plex machines on the network. This is used to define both Plex clients and servers.
Properties
| protected string | $name | The name of the Plex machine on the network. | |
| protected string | $address | The IP address of the Plex machine on the network. | |
| protected integer | $port | The port on which the Plex machine is listening. Typically 32400 for servers and 3000 for clients. | |
| protected string | $token | The token of the Plex machine on the network. |
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.
Details
at line 78
protected string
getBaseUrl()
Returns the base URL, which will be standard for all requests made to the Plex machine.
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.
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.
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.