Highlight/Highlighter.php
public static function registerLanguage($languageId, $filePath, $overwrite = false)
    {
        if (!isset(self::$classMap[$languageId]) || $overwrite) {
            $lang = new Language($languageId, $filePath);
            self::$classMap[$languageId] = $lang;

            if (isset($lang->mode->aliases)) {
                foreach ($lang->mode->aliases as $alias) {
                    self::$aliases[$alias] = $languageId;
                }
            }
        }

        return self::$classMap[$languageId];
    }
public static function registerLanguage($languageId, $filePath, $overwrite = false)
    {
        if (!isset(self::$classMap[$languageId]) || $overwrite) {
            $lang = new Language($languageId, $filePath);
            self::$classMap[$languageId] = $lang;

            if (isset($lang->mode->aliases)) {
                foreach ($lang->mode->aliases as $alias) {
                    self::$aliases[$alias] = $languageId;
                }
            }
        }

        return self::$classMap[$languageId];
    }
public static function registerLanguage ( $ languageId , $ filePath , $ overwrite = false ) { if ( ! isset ( self :: $ classMap [ $ languageId ] ) || $ overwrite ) { $ lang = new Language ( $ languageId , $ filePath ) ; self :: $ classMap [ $ languageId ] = $ lang ; if ( isset ( $ lang -> mode -> aliases ) ) { foreach ( $ lang -> mode -> aliases as $ alias ) { self :: $ aliases [ $ alias ] = $ languageId ; } } } return self :: $ classMap [ $ languageId ] ; }
Register a language definition with the Highlighter's internal language
storage. Languages are stored in a static variable, so they'll be available
across all instances. You only need to register a language once.

@param string $languageId The unique name of a language
@param string $filePath   The file path to the language definition
@param bool   $overwrite  Overwrite language if it already exists

@return Language The object containing the definition for a language's markup
Register a language definition with the Highlighter s internal language storage . Languages are stored in a static variable so they ll be available across all instances . You only need to register a language once .