blob: c0eb469550a4f44ded6d04ab04b1785abad18e07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
/**
* Get a text message
*
*/
class gtText
{
/**
* Get the text message and return it
*
* @param string $name
* @return string
*/
public static function get($name) {
$filename = dirname(__FILE__) . '/texts/' . $name . '.txt';
if (!file_exists($filename)) {
throw new LogicException('The text ' . $name . ' does not exist');
}
return file_get_contents($filename);
}
}
?>
|