blob: 8cbd1650d4df06c4d4292bc9cd7ed1ddbec63240 (
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);
  }
}
?>
 |