-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trackerStats class and property mapper for trackerStats object returned by Torrent class.
- Loading branch information
1 parent
91b7c27
commit 92945ec
Showing
1 changed file
with
127 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?php | ||
namespace Transmission\Model; | ||
|
||
/** | ||
* @author Bilal Ghouri <bilalghouri@live.com> | ||
*/ | ||
class trackerStats extends AbstractModel | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $host; | ||
|
||
/** | ||
* @var integer | ||
*/ | ||
protected $leecherCount; | ||
|
||
/** | ||
* @var integer | ||
*/ | ||
protected $seederCount; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $lastAnnounceResult; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $lastScrapeResult; | ||
|
||
/** | ||
* @param string $host | ||
*/ | ||
public function setHost($host) | ||
{ | ||
$this->host = (string) $host; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getHost() | ||
{ | ||
return $this->host; | ||
} | ||
|
||
/** | ||
* @param string $lastAnnounceResult | ||
*/ | ||
public function setLastAnnounceResult($lastAnnounceResult) | ||
{ | ||
$this->lastAnnounceResult = (string) $lastAnnounceResult; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getLastAnnounceResult() | ||
{ | ||
return $this->lastAnnounceResult; | ||
} | ||
|
||
/** | ||
* @param string $lastScrapeResult | ||
*/ | ||
public function setLastScrapeResult($lastScrapeResult) | ||
{ | ||
$this->lastScrapeResult = (string) $lastScrapeResult; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getLastScrapeResult() | ||
{ | ||
return $this->lastScrapeResult; | ||
} | ||
|
||
/** | ||
* @param integer $seederCount | ||
*/ | ||
public function setSeederCount($seederCount) | ||
{ | ||
$this->seederCount = (integer) $seederCount; | ||
} | ||
|
||
/** | ||
* @return integer | ||
*/ | ||
public function getSeederCount() | ||
{ | ||
return $this->seederCount; | ||
} | ||
|
||
/** | ||
* @param integer $leecherCount | ||
*/ | ||
public function setLeecherCount($leecherCount) | ||
{ | ||
$this->leecherCount = (integer) $leecherCount; | ||
} | ||
|
||
/** | ||
* @return integer | ||
*/ | ||
public function getLeecherCount() | ||
{ | ||
return $this->leecherCount; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public static function getMapping() | ||
{ | ||
return array( | ||
'host' => 'host', | ||
'leecherCount' => 'leecherCount', | ||
'seederCount' => 'seederCount', | ||
'lastScrapeResult' => 'lastScrapeResult', | ||
'lastAnnounceResult' => 'lastAnnounceResult' | ||
); | ||
} | ||
} |