protected static function TextimageFonts::setHandler in Textimage 7.3
Set font handler.
Parameters
string $module: optional - the name of the module to be set for handling font requests. If not specified, will use the module specified at configuration.
Return value
class the handler class or NULL if not available.
2 calls to TextimageFonts::setHandler()
- TextimageFonts::getList in classes/
TextimageFonts.inc - Get a list of font names.
- TextimageFonts::getUri in classes/
TextimageFonts.inc - Get the URI of a font file.
File
- classes/
TextimageFonts.inc, line 35 - Textimage - Font management classes.
Class
- TextimageFonts
- Font management class.
Code
protected static function setHandler($module = NULL) {
if (!isset(self::$handler) or $module and $module != self::$handlingModule) {
self::$handlingModule = $module ? $module : _textimage_get_variable('fonts_handling_module');
if (!module_exists(self::$handlingModule)) {
_textimage_diag(t("Font handling module '@module' is no longer available.", array(
'@module' => self::$handlingModule,
)), WATCHDOG_ERROR, __FUNCTION__);
return NULL;
}
$class = 'TextimageFontsHandler' . drupal_ucfirst(self::$handlingModule);
self::$handler = new $class();
}
return self::$handler;
}