Files
scummvm-web/include/Objects/GameDemo.php
T
Filippos Karapetis c55c0c6287 WEB: Add category icons to the demos page and fix some demo targets
Add a new optional tag, "category". If it's missing, the target name is
used instead
2013-12-29 13:23:42 +02:00

41 lines
887 B
PHP

<?php
require_once('Objects/BasicObject.php');
/**
* The GameDemo class represents a game demo item on the website.
*/
class GameDemo extends BasicObject {
private $_name;
private $_url;
private $_target;
private $_category;
/* GameDemo object constructor. */
public function __construct($data) {
$this->_name = $data['name'];
$this->_url = $data['url'];
$this->_target = $data['target'];
$this->_category = isset($data['category']) ? $data['category'] : $data['target'];
}
/* Get the name of the demo. */
public function getName() {
return $this->_name;
}
/* Get the download URL for the demo. */
public function getURL() {
return $this->_url;
}
/* Get the target name for the demo. */
public function getTarget() {
return $this->_target;
}
/* Get the category for the demo. */
public function getCategory() {
return $this->_category;
}
}
?>