mirror of https://github.com/YGGverse/Yoda.git
yggverse
8 months ago
6 changed files with 127 additions and 6 deletions
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
<?php |
||||
|
||||
declare(strict_types=1); |
||||
|
||||
namespace Yggverse\Yoda\Model; |
||||
|
||||
class Page |
||||
{ |
||||
public static function get(string $name): ?string |
||||
{ |
||||
$name = ucfirst( |
||||
mb_strtolower( |
||||
$name |
||||
) |
||||
); |
||||
|
||||
$filename = __DIR__ . |
||||
DIRECTORY_SEPARATOR . '..' . |
||||
DIRECTORY_SEPARATOR . 'Page' . |
||||
DIRECTORY_SEPARATOR . $name . '.gmi'; |
||||
|
||||
if (file_exists($filename) && is_readable($filename)) |
||||
{ |
||||
return file_get_contents( |
||||
$filename |
||||
); |
||||
} |
||||
|
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
# Oops! |
||||
|
||||
Something went wrong.. |
||||
|
||||
=> https://github.com/YGGverse/Yoda/issues Report |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# Welcome to Yoda! |
||||
|
||||
=> https://github.com/YGGverse/Yoda |
Loading…
Reference in new issue