blob: a073d984dcc7f596afeab4cbda2f127881a36795 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?php
class Fortune
{
public function random(): string
{
return $this->quotes()[array_rand($this->quotes())];
}
public function quotes(): array
{
return include $_SERVER['DOCUMENT_ROOT'] . '/..' . '/generators/fortune/fortune.quotes';
}
}
|