## /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

- filesource: Source Code for this file
- version: $Id: _geshi_php.html,v 1.1 2006/01/23 09:27:29 wangcs Exp $
- license: GNU GPL
- copyright: Copyright &copy; 2004, 2005, Nigel McNie
- author: Nigel McNie <mailto:nigel@geshi.org>

Constants
GESHI_ACTIVE = 2 (line 91)

Links in the source in the :active state

GESHI_CAPS_LOWER = 2 (line 83)

Leave keywords found as the case that they are

GESHI_CAPS_NO_CHANGE = (line 79)

Lowercase keywords found

GESHI_CAPS_UPPER = 1 (line 81)

Uppercase keywords found

GESHI_DIR_SEPARATOR = ('WIN'!=substr(PHP_OS,0,3))?'/':'\\' (line 49)

Set the correct directory separator

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

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 = (line 71)

Use nothing to surround the source

GESHI_HEADER_PRE = 2 (line 75)

Use a "pre" to surround the source

GESHI_HOVER = 1 (line 89)

Links in the source in the :hover state

GESHI_LANG_ROOT = GESHI_ROOT.'geshi'.GESHI_DIR_SEPARATOR (line 58)

The language file directory for GeSHi

GESHI_LINK = (line 87)

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 = (line 63)

Use no line numbers when building the result

GESHI_OUTPUT_HTML = (line 46)

For the future (though this may never be realised)

GESHI_ROOT = dirname(__FILE__).GESHI_DIR_SEPARATOR (line 54)

The root directory for GeSHi

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

The starter for important parts of the source

GESHI_VERSION = '1.0.7.3' (line 43)

The version of this GeSHi file

GESHI_VISITED = 3 (line 93)

Links in the source in the :visited state

Functions
geshi_highlight (line 2615)

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, [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, 22 Sep 2005 13:47:53 +1200 by phpDocumentor 1.2.3