Docs for page geshi.php

## /geshi.php

Description

GeSHi - Generic Syntax Highlighter

The GeSHi class for Generic Syntax Highlighting. Please refer to the documentation at http://qbnz.com/highlighter/documentation.php for more information about how to use this class.

For changes, release notes, TODOs etc, see the relevant files in the docs/ directory.

This file is part of GeSHi.

GeSHi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

GeSHi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GeSHi; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

- author: Nigel McNie <nigel@geshi.org>, Benny Baumann <BenBE@omorphia.de>
- copyright: (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann
- filesource: Source Code for this file
- license: GNU GPL

Classes

Class | Description
--- | ---
GeSHi | The GeSHi Class.

Constants
GESHI_ACTIVE = 2 (line 107)

Links in the source in the :active state

GESHI_CAPS_LOWER = 2 (line 99)

Leave keywords found as the case that they are

GESHI_CAPS_NO_CHANGE = 0 (line 95)

Lowercase keywords found

GESHI_CAPS_UPPER = 1 (line 97)

Uppercase keywords found

GESHI_END_IMPORTANT = '<END GeSHi>' (line 117)

The ender for important parts of the source

GESHI_FANCY_LINE_NUMBERS = 2 (line 67)

Use fancy line numbers when building the result

GESHI_HEADER_DIV = 1 (line 73)

Use a "div" to surround the source

GESHI_HEADER_NONE = 0 (line 71)

Use nothing to surround the source

GESHI_HEADER_PRE = 2 (line 75)

Use a "pre" to surround the source

GESHI_HEADER_PRE_TABLE = 4 (line 91)

Use a "table" to surround the source:

<table> <thead><tr><td colspan="2">$header</td></tr></thead> <tbody><tr><td>

    $linenumbers

</td><td>

    $code>

</td></tr></tbody> <tfooter><tr><td colspan="2">$footer</td></tr></tfoot> </table>

this is essentially only a workaround for Firefox, see sf#1651996 or take a look at https://bugzilla.mozilla.org/show_bug.cgi?id=365805

- note: when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE

GESHI_HEADER_PRE_VALID = 3 (line 77)

Use a pre to wrap lines when line numbers are enabled or to wrap the whole code.

GESHI_HOVER = 1 (line 105)

Links in the source in the :hover state

GESHI_LANG_ROOT = GESHI_ROOT.'geshi'.DIRECTORY_SEPARATOR (line 53)

The language file directory for GeSHi

GESHI_LINK = 0 (line 103)

Links in the source in the :link state

GESHI_NORMAL_LINE_NUMBERS = 1 (line 65)

Use normal line numbers when building the result

GESHI_NO_LINE_NUMBERS = 0 (line 63)

Use no line numbers when building the result

GESHI_ROOT = dirname(__FILE__).DIRECTORY_SEPARATOR (line 49)

The root directory for GeSHi

GESHI_SECURITY_PARANOID = false (line 58)

Tells GeSHi to be paranoid about security settings

GESHI_START_IMPORTANT = '<BEGIN GeSHi>' (line 115)

The starter for important parts of the source

GESHI_VERSION = '1.0.8.2', (line 44)

The version of this GeSHi file

GESHI_VISITED = 3 (line 109)

Links in the source in the :visited state

Functions
geshi_highlight (line 4577)

Easy way to highlight stuff. Behaves just like highlight_string

- return: The code highlighted (if $return is true)
- since: 1.0.2

string geshi_highlight (string $string, string $language, [string $path = null], [boolean $return = false])

- string $string: The code to highlight
- string $language: The language to highlight the code in
- string $path: The path to the language files. You can leave this blank if you need as from version 1.0.7 the path should be automatically detected
- boolean $return: Whether to return the result or to echo

Documentation generated on Thu, 25 Dec 2008 14:34:34 +0100 by phpDocumentor 1.4.2