This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
* @author <[email protected]> Nick Bartkowiak | ||
* @copyright (c) 2012 Nick Bartkowiak | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU Public Licence (GPLv3) | ||
* @version 0.0.1 | ||
* @version 0.0.2 | ||
*/ | ||
class Plex_Client extends Plex_MachineAbstract | ||
{ | ||
|
@@ -72,19 +72,22 @@ class Plex_Client extends Plex_MachineAbstract | |
* @param string $name The name of the Plex client. | ||
* @param string $address The IP address of the Plex client. | ||
* @param integer $port The port on which the Plex client is listening. | ||
* @param string $token The token of the Plex client. | ||
* | ||
* @uses Plex_MachineAbstract::$name | ||
* @uses Plex_MachineAbstract::$address | ||
* @uses Plex_MachineAbstract::$port | ||
* @uses Plex_MachineAbstract::$token | ||
* @uses Plex_Client::DEFAULT_PORT | ||
* | ||
* @return void | ||
*/ | ||
public function __construct($name, $address, $port) | ||
public function __construct($name, $address, $port, $token) | ||
{ | ||
$this->name = $name; | ||
$this->address = $address; | ||
$this->port = $port ? $port : self::DEFAULT_PORT; | ||
$this->token = $token; | ||
} | ||
|
||
/** | ||
|
@@ -107,6 +110,7 @@ private function getController($type) | |
$this->name, | ||
$this->address, | ||
$this->port, | ||
$this->token, | ||
$this->getServer() | ||
); | ||
} | ||
|
@@ -192,6 +196,16 @@ public function getPort() | |
return $this->port; | ||
} | ||
|
||
/** | ||
* Returns the token on which the Plex machine listens. | ||
* | ||
* @return string|null The token on which the Plex machine listens. | ||
*/ | ||
public function getToken() | ||
{ | ||
return $this->token; | ||
} | ||
|
||
/** | ||
* Returns the hostname of the Plex client. | ||
* | ||
|