1
0
www.mikescher.com/www/internals/modules/webapps.php

31 lines
532 B
PHP
Raw Normal View History

2018-05-13 15:46:13 +02:00
<?php
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
{
2020-01-15 02:50:23 +01:00
$all = require (__DIR__ . '/../../statics/webapps/__all.php');
2018-05-13 15:46:13 +02:00
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;
}
2020-01-15 02:50:23 +01:00
}