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