1
0
www.mikescher.com/www/internals/webapp.php

36 lines
561 B
PHP
Raw Normal View History

2018-05-13 15:46:13 +02:00
<?php
2020-01-15 00:50:55 +01:00
require_once 'website.php';
2018-05-13 15:46:13 +02:00
class WebApps
{
2020-01-15 00:50:55 +01:00
/** @var array */
private $staticData;
public function __construct()
{
$this->load();
}
private function load()
2018-05-13 15:46:13 +02:00
{
$all = require (__DIR__ . '/../statics/webapps/__all.php');
2020-01-15 00:50:55 +01:00
$this->staticData = array_map(function($a){return self::readSingle($a);}, $all);
2018-05-13 15:46:13 +02:00
}
2020-01-15 00:50:55 +01:00
private static function readSingle($a)
2018-05-13 15:46:13 +02:00
{
return $a;
}
2020-01-15 00:50:55 +01:00
public function listAllNewestFirst()
2018-05-13 15:46:13 +02:00
{
2020-01-15 00:50:55 +01:00
$data = $this->staticData;
2018-05-13 15:46:13 +02:00
usort($data, function($a, $b) { return strcasecmp($b['date'], $a['date']); });
return $data;
}
}