2024-04-27 17:01:57 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** The current Feed Reader Central version */
|
2024-05-24 02:06:16 +00:00
|
|
|
const FRC_VERSION = '1.0.0-alpha7';
|
2024-04-27 17:01:57 +00:00
|
|
|
|
|
|
|
spl_autoload_register(function ($class) {
|
|
|
|
$file = implode(DIRECTORY_SEPARATOR, [__DIR__, 'lib', "$class.php"]);
|
|
|
|
if (file_exists($file)) {
|
|
|
|
require $file;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
require 'user-config.php';
|
|
|
|
|
|
|
|
Data::ensureDb();
|
2024-04-30 22:51:09 +00:00
|
|
|
|
|
|
|
/** @var string The date the world wide web was created */
|
|
|
|
const WWW_EPOCH = '1993-04-30T00:00:00+00:00';
|
2024-05-24 02:06:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Capitalize the first letter of the given string
|
|
|
|
*
|
|
|
|
* @param string $value The string to be capitalized
|
|
|
|
* @return string The given string with the first letter capitalized
|
|
|
|
*/
|
|
|
|
function init_cap(string $value): string {
|
|
|
|
return match (strlen($value)) {
|
|
|
|
0 => "",
|
|
|
|
1 => strtoupper($value),
|
|
|
|
default => strtoupper(substr($value, 0, 1)) . substr($value, 1),
|
|
|
|
};
|
|
|
|
}
|