Files
scummvm-web/include/Objects/Screenshot.php
T
Eugene Sandulenko d429c48de0 Website rewrite from Fredrik Wendel
svn path=/web/trunk/; revision=40814
2009-05-23 18:45:30 +00:00

43 lines
967 B
PHP

<?php
require_once('Objects/BasicObject.php');
/**
* The Screenshot object represents all screenshots for one game.
*/
class Screenshot extends BasicObject {
private $_name;
private $_category;
private $_files;
/* The Screenshot object constructor. */
public function __construct($data) {
$this->_name = $data['name'];
$this->_category = $data['category'];
$this->_files = array();
if (isset($data['image'])) {
#parent::toArray($data['image']);
foreach ($data['image'] as $value) {
$this->_files[] = array(
'filename' => $value['file'],
'caption' => $value['caption'],
);
}
}
}
/* Get the name. */
public function getName() {
return $this->_name;
}
/* Get the category this screenshot belongs too. */
public function getCategory() {
return $this->_category;
}
/* Get the list of files, with the base filename as key and the caption as value. */
public function getFiles() {
return $this->_files;
}
}
?>