fititnt - Especialista e Desenvolvedor Joomla! Visit fititnt.org, and look for some extension or more Joomla Framework info core
[ class tree: core ] [ index: core ] [ all elements ]

Procedural File: geshi.php

Source Location: /mambots/content/geshi/geshi.php

Page Details

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>
Version:  $Id: geshi.php 2970 2006-03-30 07:51:33Z stingrey $
Copyright:  Copyright &copy; 2004, 2005, Nigel McNie
Filesource:  Source Code for this file
License:  GNU GPL
Classes
Class Description
GeSHi The GeSHi Class.
Constants
GESHI_ACTIVE  [line 88]

GESHI_ACTIVE = 2

Links in the source in the :active state


[ Top ]

GESHI_AFTER  [line 125]

GESHI_AFTER = 4

The key of the regex array defining what bracket group in a

API Tags:
Access:  private


[ Top ]

GESHI_ALWAYS  [line 110]

GESHI_ALWAYS = 2

Strict mode always applies

API Tags:
Access:  private


[ Top ]

GESHI_BEFORE  [line 122]

GESHI_BEFORE = 3

The key of the regex array defining what bracket group in a

API Tags:
Access:  private


[ Top ]

GESHI_CAPS_LOWER  [line 80]

GESHI_CAPS_LOWER = 2

Leave keywords found as the case that they are


[ Top ]

GESHI_CAPS_NO_CHANGE  [line 76]

GESHI_CAPS_NO_CHANGE = 0

Lowercase keywords found


[ Top ]

GESHI_CAPS_UPPER  [line 78]

GESHI_CAPS_UPPER = 1

Uppercase keywords found


[ Top ]

GESHI_COMMENTS  [line 128]

GESHI_COMMENTS = 0

Used in language files to mark comments

API Tags:
Access:  private


[ Top ]

GESHI_DIR_SEPARATOR  [line 46]

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

Set the correct directory separator


[ Top ]

GESHI_END_IMPORTANT  [line 98]

GESHI_END_IMPORTANT = '<END GeSHi>'

The ender for important parts of the source


[ Top ]

GESHI_ERROR_FILE_NOT_READABLE  [line 138]

GESHI_ERROR_FILE_NOT_READABLE = 3

GeSHi could not open a file for reading (generally a language file)

API Tags:
Access:  private


[ Top ]

GESHI_ERROR_INVALID_HEADER_TYPE  [line 140]

GESHI_ERROR_INVALID_HEADER_TYPE = 4

The header type passed to GeSHi::set_header_type() was invalid

API Tags:
Access:  private


[ Top ]

GESHI_ERROR_INVALID_LINE_NUMBER_TYPE  [line 142]

GESHI_ERROR_INVALID_LINE_NUMBER_TYPE = 5

The line number type passed to GeSHi::enable_line_numbers() was invalid

API Tags:
Access:  private


[ Top ]

GESHI_ERROR_NO_INPUT  [line 134]

GESHI_ERROR_NO_INPUT = 1

No sourcecode to highlight was specified

API Tags:
Deprecated:  
Access:  private


[ Top ]

GESHI_ERROR_NO_SUCH_LANG  [line 136]

GESHI_ERROR_NO_SUCH_LANG = 2

The language specified does not exist

API Tags:
Access:  private


[ Top ]

GESHI_FANCY_LINE_NUMBERS  [line 64]

GESHI_FANCY_LINE_NUMBERS = 2

Use fancy line numbers when building the result


[ Top ]

GESHI_HEADER_DIV  [line 70]

GESHI_HEADER_DIV = 1

Use a "div" to surround the source


[ Top ]

GESHI_HEADER_NONE  [line 68]

GESHI_HEADER_NONE = 0

Use nothing to surround the source


[ Top ]

GESHI_HEADER_PRE  [line 72]

GESHI_HEADER_PRE = 2

Use a "pre" to surround the source


[ Top ]

GESHI_HOVER  [line 86]

GESHI_HOVER = 1

Links in the source in the :hover state


[ Top ]

GESHI_LANG_ROOT  [line 55]

GESHI_LANG_ROOT = GESHI_ROOT.'geshi'.GESHI_DIR_SEPARATOR

The language file directory for GeSHi


[ Top ]

GESHI_LINK  [line 84]

GESHI_LINK = 0

Links in the source in the :link state


[ Top ]

GESHI_MAYBE  [line 108]

GESHI_MAYBE = 1

Strict mode *might* apply, and can be enabled or

API Tags:
Access:  private


[ Top ]

GESHI_MODIFIERS  [line 119]

GESHI_MODIFIERS = 2

The key of the regex array defining any modifiers to the regular expression

API Tags:
Access:  private


[ Top ]

GESHI_NEVER  [line 105]

GESHI_NEVER = 0

Strict mode never applies (this is the most common)

API Tags:
Access:  private


[ Top ]

GESHI_NORMAL_LINE_NUMBERS  [line 62]

GESHI_NORMAL_LINE_NUMBERS = 1

Use normal line numbers when building the result


[ Top ]

GESHI_NO_LINE_NUMBERS  [line 60]

GESHI_NO_LINE_NUMBERS = 0

Use no line numbers when building the result


[ Top ]

GESHI_REPLACE  [line 117]

GESHI_REPLACE = 1

The key of the regex array defining what bracket group in a

API Tags:
Access:  private


[ Top ]

GESHI_ROOT  [line 51]

GESHI_ROOT = dirname(__FILE__).GESHI_DIR_SEPARATOR

The root directory for GeSHi


[ Top ]

GESHI_SEARCH  [line 114]

GESHI_SEARCH = 0

The key of the regex array defining what to search for

API Tags:
Access:  private


[ Top ]

GESHI_START_IMPORTANT  [line 96]

GESHI_START_IMPORTANT = '<BEGIN GeSHi>'

The starter for important parts of the source


[ Top ]

GESHI_VERSION  [line 43]

GESHI_VERSION = '1.0.7.8'

The version of this GeSHi file


[ Top ]

GESHI_VISITED  [line 90]

GESHI_VISITED = 3

Links in the source in the :visited state


[ Top ]


Functions
geshi_highlight  [line 2683]

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

Easy way to highlight stuff. Behaves just like highlight_string

Parameters:
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

API Tags:
Return:  The code highlighted (if $return is true)

Information Tags:
Since:  1.0.2

[ Top ]


The site fititnt.org is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. If you are looking for official documentation, visit api.joomla.org and docs.joomla.org.
Documentation generated on Mon, 26 Oct 2009 22:53:17 -0200 by phpDocumentor 1.4.3