Files
scummvm-web/include/Objects/DSection.php
T
Eugene Sandulenko 5e9471afc5 WEB: Overhaul of download urls.
Now by default we're looking into local FS.
There are 3 potential places for files: frs/scummvm/, frs/scummvm-tools/
and downloads/. They're now governed by 'type' attribute to url.
2016-03-02 00:03:47 +01:00

48 lines
1.1 KiB
PHP

<?php
require_once('Objects/BasicObject.php');
require_once('Objects/DSubSection.php');
/**
* The DSection object represents a section on the downloads page.
*/
class DSection extends BasicObject{
private $_title;
private $_anchor;
private $_baseurl;
private $_subsections;
/* DSection object constructor. */
public function __construct($data) {
$this->_title = $data['title'];
$this->_anchor = $data['anchor'];
$this->_baseurl = $data['baseurl'];
$this->_baseturl = $data['baseturl'];
$this->_subsections = array();
parent::toArray($data['subsection']);
foreach ($data['subsection'] as $key => $value) {
$this->_subsections[] = new DSubSection($value, $this->_baseurl, $this->_baseturl);
}
}
/* Get the title. */
public function getTitle() {
return $this->_title;
}
/* Get the anchor name. */
public function getAnchor() {
return $this->_anchor;
}
/* Get the base URL. */
public function getBaseURL() {
return $this->_baseurl;
}
/* Get the list of optional subsections. */
public function getSubSections() {
return $this->_subsections;
}
}
?>