mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-06-20 05:45:49 +00:00
WEB: Add new Models and Objects to support the new data files
This commit is contained in:
1 parent
c6207590c9
commit
a75a6c70ee
11 files changed
+333
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace ScummVM\Models;
|
||||
|
||||
use ScummVM\Objects\Platform;
|
||||
|
||||
/**
|
||||
* The PlatformsModel is used to cross reference Platforms across the website
|
||||
*/
|
||||
abstract class PlatformsModel extends BasicModel
|
||||
{
|
||||
/* Get all Platforms from YAML */
|
||||
public static function getAllPlatforms()
|
||||
{
|
||||
$fname = DIR_DATA . '/platforms.yaml';
|
||||
$platforms = \yaml_parse_file($fname);
|
||||
$data = [];
|
||||
foreach ($platforms as $platform) {
|
||||
$obj = new Platform($platform);
|
||||
$data[$obj->getId()] = $obj;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user