php-src/scripts/dev/generate-phpt/src/gtText.php
2009-05-07 09:21:43 +00:00

27 lines
No EOL
426 B
PHP

<?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);
}
}
?>