Joomla CMS
2.5.24 (avec JPlatform 11.4 inclus)
Documentation des API du CMS Joomla en version 2.5 et du framework Joomla Platform intégré
|
GeSHi::_genCSSName | ( | $name | ) |
Références $name.
Référencé par get_stylesheet(), et header().
GeSHi::_optimize_regexp_list_tokens_to_string | ( | & | $tokens, |
$recursed = false |
|||
) |
this function creates the appropriate regexp string of an token array you should not call this function directly,
&$tokens | array of tokens |
$recursed | bool to know wether we recursed or not |
Références $list.
Référencé par optimize_regexp_list().
GeSHi::add_keyword | ( | $key, | |
$word | |||
) |
Adds a keyword to a keyword group for highlighting
int | The key of the keyword group to add the keyword to |
string | The word to add to the keyword group |
Références $key.
GeSHi::add_keyword_group | ( | $key, | |
$styles, | |||
$case_sensitive = true , |
|||
$words = array() |
|||
) |
Creates a new keyword group
int | The key of the keyword group to create |
string | The styles for the keyword group |
boolean | Whether the keyword group is case sensitive ornot |
array | The words to use for the keyword group |
Références $key, et optimize_keyword_group().
GeSHi::build_parse_cache | ( | ) |
Setup caches needed for parsing. This is automatically called in parse_code() when appropriate. This function makes stylesheet generators much faster as they do not need these caches.
Références $i, $key, build_style_cache(), elseif, GESHI_NUMBER_BIN_PREFIX_0B, GESHI_NUMBER_BIN_PREFIX_PERCENT, GESHI_NUMBER_BIN_SUFFIX, GESHI_NUMBER_FLT_NONSCI, GESHI_NUMBER_FLT_NONSCI_F, GESHI_NUMBER_FLT_SCI_SHORT, GESHI_NUMBER_FLT_SCI_ZERO, GESHI_NUMBER_HEX_PREFIX, GESHI_NUMBER_HEX_PREFIX_DOLLAR, GESHI_NUMBER_HEX_SUFFIX, GESHI_NUMBER_INT_BASIC, GESHI_NUMBER_INT_CSTYLE, GESHI_NUMBER_OCT_PREFIX, GESHI_NUMBER_OCT_PREFIX_0O, GESHI_NUMBER_OCT_PREFIX_AT, GESHI_NUMBER_OCT_SUFFIX, hsc(), et optimize_keyword_group().
Référencé par parse_code().
GeSHi::build_style_cache | ( | ) |
Setup caches needed for styling. This is automatically called in parse_code() and get_stylesheet() when appropriate. This function helps stylesheet generators as they rely on some style information being preprocessed
Références $i, GESHI_NUMBER_FLT_NONSCI, et GESHI_NUMBER_INT_BASIC.
Référencé par build_parse_cache(), et get_stylesheet().
GeSHi::change_case | ( | $instr | ) |
Changes the case of a keyword for those languages where a change is asked for
string | The keyword to change the case of |
Références GESHI_CAPS_LOWER, et GESHI_CAPS_UPPER.
Référencé par handle_keyword_replace(), et parse_code().
GeSHi::disable_highlighting | ( | ) |
Disables all highlighting
Références enable_highlighting().
GeSHi::enable_classes | ( | $flag = true | ) |
Sets whether CSS classes should be used to highlight the source. Default is off, calling this method with no arguments will turn it on
boolean | Whether to turn classes on or not |
GeSHi::enable_highlighting | ( | $flag = true | ) |
Enables all highlighting
The optional flag parameter was added in version 1.0.7.21 and can be used to enable (true) or disable (false) all highlighting.
boolean | A flag specifying whether to enable or disable all highlighting |
Références $key, et enable_important_blocks().
Référencé par disable_highlighting(), et load_language().
GeSHi::enable_ids | ( | $flag = true | ) |
Whether CSS IDs should be added to each line
boolean | If true, IDs will be added to each line. |
GeSHi::enable_important_blocks | ( | $flag | ) |
Sets whether context-important blocks are highlighted
boolean | Tells whether to enable or disable highlighting of important blocks |
Référencé par enable_highlighting(), finalise(), et parse_code().
GeSHi::enable_inner_code_block | ( | $flag | ) |
Sets whether to force a surrounding block around the highlighted code or not
boolean | Tells whether to enable or disable this feature |
GeSHi::enable_keyword_links | ( | $enable = true | ) |
Turns linking of keywords on or off.
boolean | If true, links will be added to keywords |
GeSHi::enable_line_numbers | ( | $flag, | |
$nth_row = 5 |
|||
) |
Sets whether line numbers should be displayed.
Valid values for the first parameter are:
For fancy line numbers, the second parameter is used to signal which lines are to be fancy. For example, if the value of this parameter is 5 then every 5th line will be fancy.
int | How line numbers should be displayed |
int | Defines which lines are fancy |
Références error(), GESHI_ERROR_INVALID_LINE_NUMBER_TYPE, GESHI_FANCY_LINE_NUMBERS, GESHI_NO_LINE_NUMBERS, et GESHI_NORMAL_LINE_NUMBERS.
GeSHi::enable_multiline_span | ( | $flag | ) |
Sets wether spans and other HTML markup generated by GeSHi can span over multiple lines or not. Defaults to true to reduce overhead. Set it to false if you want to manipulate the output or manually display the code in an ordered list.
boolean | Wether multiline spans are allowed or not |
GeSHi::enable_strict_mode | ( | $mode = true | ) |
Enables/disables strict highlighting. Default is off, calling this method without parameters will turn it on. See documentation for more details on strict mode and where to use it.
boolean | Whether to enable strict mode or not |
Références $mode, GESHI_ALWAYS, GESHI_MAYBE, et GESHI_NEVER.
GeSHi::error | ( | ) |
Returns an error message associated with the last GeSHi operation, or false if no error has occured
Références language.
Référencé par enable_line_numbers(), get_language_fullname(), get_language_name(), get_stylesheet(), load_from_file(), parse_code(), set_header_type(), et set_language().
GeSHi::finalise | ( | & | $parsed_code | ) |
Takes the parsed code and various options, and creates the HTML surrounding it to make it look nice.
string | The code already parsed (reference!) |
NOTE: memorypeak #1
NOTE: memorypeak #2
Références $i, $key, $line_style1, $line_style2, $n, elseif, enable_important_blocks(), footer(), GESHI_END_IMPORTANT, GESHI_FANCY_LINE_NUMBERS, GESHI_HEADER_PRE, GESHI_HEADER_PRE_TABLE, GESHI_HEADER_PRE_VALID, GESHI_NO_LINE_NUMBERS, GESHI_START_IMPORTANT, get_line_style(), header(), hsc(), et indent().
Référencé par parse_code().
GeSHi::footer | ( | ) |
Returns the footer for the code block.
Références $footer_content, elseif, GESHI_HEADER_DIV, GESHI_HEADER_NONE, GESHI_HEADER_PRE, GESHI_HEADER_PRE_TABLE, GESHI_HEADER_PRE_VALID, GESHI_NO_LINE_NUMBERS, et replace_keywords().
Référencé par finalise().
GeSHi::GeSHi | ( | $source = '' , |
|
$language = '' , |
|||
$path = '' |
|||
) |
#@- Creates a new GeSHi object, with source and language
string | The source code to highlight |
string | The language to highlight the source with |
string | The path to the language file directory. This is deprecated! I've backported the auto path detection from the 1.1.X dev branch, so now it should be automatically set correctly. If you have renamed the language directory however, you will still need to set the path using this parameter or GeSHi->set_language_path() |
Références $language, $path, $source, set_language(), set_language_path(), et set_source().
GeSHi::get_language_fullname | ( | $language | ) |
Get full_name for a lang or false.
string | $language | short langname (html4strict for example) |
Références $data, $language, et error().
Référencé par get_supported_languages().
GeSHi::get_language_name | ( | ) |
Gets a human-readable language name (thanks to Simon Patterson for the idea :))
Références error(), et GESHI_ERROR_NO_SUCH_LANG.
GeSHi::get_language_name_from_extension | ( | $extension, | |
$lookup = array() |
|||
) |
Given a file extension, this method returns either a valid geshi language name, or the empty string if it couldn't be found
string | The extension to get a language name for |
array | A lookup array to use instead of the default one |
Références $extension, et $lang.
Référencé par load_from_file().
GeSHi::get_line_style | ( | $line | ) |
Get's the style that is used for the specified line
int | The line number information is requested for private |
Références $highlight_extra_lines_style, $style, et null.
Référencé par finalise().
GeSHi::get_multiline_span | ( | ) |
Get current setting for multiline spans, see GeSHi->enable_multiline_span().
Références $allow_multiline_span.
GeSHi::get_real_tab_width | ( | ) |
Returns the tab width to use, based on the current language and user preference
Références $tab_width.
Référencé par indent().
GeSHi::get_stylesheet | ( | $economy_mode = true | ) |
Returns a stylesheet for the highlighted code. If $economy mode is true, we only return the stylesheet declarations that matter for this code block instead of the whole thing
boolean | Whether to use economy mode or not |
Références $key, $style, _genCSSName(), build_style_cache(), error(), GESHI_ACTIVE, GESHI_CLASS, GESHI_FANCY_LINE_NUMBERS, GESHI_HOVER, GESHI_LINK, GESHI_NO_LINE_NUMBERS, GESHI_VISITED, et language.
GeSHi::get_supported_languages | ( | $full_names = false | ) |
Get supported langs or an associative array lang=>full_name.
boolean | $longnames |
Références get_language_fullname().
GeSHi::get_time | ( | ) |
Gets the time taken to parse the code
Références $time.
Référencé par replace_keywords().
GeSHi::handle_keyword_replace | ( | $match | ) |
Handles replacements of keywords to include markup and links if requested
string | The keyword to add the Markup to |
Références $_kw_replace_group, change_case(), et hsc().
GeSHi::handle_multiline_regexps | ( | $matches | ) |
handles newlines in REGEXPS matches. Set the hmr* vars before calling this
array | the matches array |
Références $_hmr_after, $_hmr_before, et $_hmr_replace.
GeSHi::handle_regexps_callback | ( | $matches | ) |
handles regular expressions highlighting-definitions with callback functions
array | the matches array |
GeSHi::header | ( | ) |
Creates the header for the code block (with correct attributes)
Références $header_content, _genCSSName(), elseif, GESHI_HEADER_DIV, GESHI_HEADER_NONE, GESHI_HEADER_PRE, GESHI_HEADER_PRE_TABLE, GESHI_HEADER_PRE_VALID, GESHI_NO_LINE_NUMBERS, language, et replace_keywords().
Référencé par finalise().
GeSHi::highlight_lines_extra | ( | $lines, | |
$style = null |
|||
) |
Specifies which lines to highlight extra
The extra style parameter was added in 1.0.7.21.
mixed | An array of line numbers to highlight, or just a line number on its own. |
string | A string specifying the style to use for this line. If null is specified, the default style is used. If false is specified, the line will be removed from special highlighting |
GeSHi::hsc | ( | $string, | |
$quote_style = ENT_COMPAT |
|||
) |
Secure replacement for PHP built-in function htmlspecialchars().
See ticket #427 (http://wush.net/trac/wikka/ticket/427) for the rationale for this replacement function.
The INTERFACE for this function is almost the same as that for htmlspecialchars(), with the same default for quote style; however, there is no 'charset' parameter. The reason for this is as follows:
The PHP docs say: "The third argument charset defines character set used in conversion."
I suspect PHP's htmlspecialchars() is working at the byte-value level and thus needs to know (or asssume) a character set because the special characters to be replaced could exist at different code points in different character sets. (If indeed htmlspecialchars() works at byte-value level that goes some way towards explaining why the vulnerability would exist in this function, too, and not only in htmlentities() which certainly is working at byte-value level.)
This replacement function however works at character level and should therefore be "immune" to character set differences - so no charset parameter is needed or provided. If a third parameter is passed, it will be silently ignored.
In the OUTPUT there is a minor difference in that we use ''' instead of PHP's ''' for a single quote: this provides compatibility with get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES) (see comment by mikiwoz at yahoo dot co dot uk on http://php.net/htmlspecialchars); it also matches the entity definition for XML 1.0 (http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters). Like PHP we use a numeric character reference instead of ''' for the single quote. For the other special characters we use the named entity references, as PHP is doing.
http://www.gnu.org/copyleft/lgpl.html GNU Lesser General Public License
private
string | $string | string to be converted |
integer | $quote_style |
|
Références ENT_QUOTES.
Référencé par build_parse_cache(), finalise(), handle_keyword_replace(), parse_code(), et parse_non_string_part().
GeSHi::indent | ( | & | $result | ) |
Swaps out spaces and tabs for HTML indentation. Not needed if the code is in a pre block...
string | The source to indent (reference!) |
Replace tabs with the correct number of spaces
Références $i, $key, $n, $tab_width, elseif, GESHI_HEADER_PRE_TABLE, GESHI_NO_LINE_NUMBERS, get_real_tab_width(), et null.
Référencé par finalise().
GeSHi::load_from_file | ( | $file_name, | |
$lookup = array() |
|||
) |
Given a file name, this method loads its contents in, and attempts to set the language automatically. An optional lookup table can be passed for looking up the language name. If not specified a default table is used
The language table is in the form
array( 'lang_name' => array('extension', 'extension', ...), 'lang_name' ... );
string | The filename to load the source from |
array | A lookup array to use instead of the default one |
Références error(), GESHI_ERROR_FILE_NOT_READABLE, get_language_name_from_extension(), set_language(), et set_source().
GeSHi::load_language | ( | $file_name | ) |
Gets language information and stores it for later use
string | The filename of the language file you want to load |
Références $key, $language_data, enable_highlighting(), GESHI_NEVER, et merge_arrays().
Référencé par set_language().
GeSHi::merge_arrays | ( | ) |
Merges arrays recursively, overwriting values of the first array with values of later arrays
Référencé par load_language().
GeSHi::optimize_keyword_group | ( | $key | ) |
compile optimized regexp list for keyword group
int | The key of the keyword group to compile & optimize |
Références $key, et optimize_regexp_list().
Référencé par add_keyword_group(), build_parse_cache(), et remove_keyword().
GeSHi::optimize_regexp_list | ( | $list, | |
$regexp_delimiter = '/' |
|||
) |
this functions creates an optimized regular expression list of an array of strings.
Example: $list = array('faa', 'foo', 'foobar'); => string 'f(aa|oo(bar)?)'
$list | array of (unquoted) strings |
$regexp_delimiter | your regular expression delimiter, |
Références $i, $list, _optimize_regexp_list_tokens_to_string(), GESHI_MAX_PCRE_LENGTH, et GESHI_MAX_PCRE_SUBPATTERNS.
Référencé par optimize_keyword_group().
GeSHi::parse_code | ( | ) |
Returns the code in $this->source, highlighted and surrounded by the nessecary HTML.
This should only be called ONCE, cos it's SLOW! If you want to highlight the same source multiple times, you're better off doing a whole lot of str_replaces to replace the <span>s
The value in $delimiters is expected to be an RegExp containing exactly 2 matching groups:
NOTE: memorypeak #3
Références $allow_multiline_span, $i, $key, $parts, build_parse_cache(), change_case(), elseif, enable_important_blocks(), error(), finalise(), GESHI_COMMENTS, GESHI_END_IMPORTANT, GESHI_MAYBE, GESHI_NO_LINE_NUMBERS, GESHI_PHP_PRE_433, GESHI_START_IMPORTANT, hsc(), null, parse_non_string_part(), et set_time().
GeSHi::parse_non_string_part | ( | $stuff_to_parse | ) |
Takes a string that has no strings or comments in it, and highlights stuff like keywords, numbers and methods.
string | The string to parse for keyword, numbers etc. |
Références $id, $key, GESHI_AFTER, GESHI_BEFORE, GESHI_CLASS, GESHI_LINK, GESHI_MODIFIERS, GESHI_NO_LINE_NUMBERS, GESHI_REPLACE, GESHI_SEARCH, et hsc().
Référencé par parse_code().
GeSHi::remove_keyword | ( | $key, | |
$word, | |||
$recompile = true |
|||
) |
Removes a keyword from a keyword group
int | The key of the keyword group to remove the keyword from |
string | The word to remove from the keyword group |
bool | Wether to automatically recompile the optimized regexp list or not. Note: if you set this to false and |
Références $key, et optimize_keyword_group().
GeSHi::remove_keyword_group | ( | $key | ) |
Removes a keyword group
int | The key of the keyword group to remove |
Références $key.
GeSHi::replace_keywords | ( | $instr | ) |
Replaces certain keywords in the header and footer with certain configuration values
string | The header or footer content to do replacement on |
Références $time, GESHI_VERSION, et get_time().
Référencé par footer(), et header().
GeSHi::set_brackets_highlighting | ( | $flag | ) |
Turns highlighting on/off for brackets
This method is DEPRECATED: use set_symbols_highlighting instead. This method will be remove in 1.2.X
boolean | Whether to turn highlighting for brackets on or off |
Référencé par set_symbols_highlighting().
GeSHi::set_brackets_style | ( | $style, | |
$preserve_defaults = false |
|||
) |
Sets the styles for brackets. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
This method is DEPRECATED: use set_symbols_style instead. This method will be removed in 1.2.X
string | The style to make the brackets |
boolean | Whether to merge the new styles with the old or just to overwrite them |
Références $style.
Référencé par set_symbols_style().
GeSHi::set_case_keywords | ( | $case | ) |
Sets the case that keywords should use when found. Use the constants:
int | A constant specifying what to do with matched keywords |
Références GESHI_CAPS_LOWER, GESHI_CAPS_NO_CHANGE, et GESHI_CAPS_UPPER.
GeSHi::set_case_sensitivity | ( | $key, | |
$case | |||
) |
Sets whether a set of keywords are checked for in a case sensitive manner
int | The key of the keyword group to change the case sensitivity of |
boolean | Whether to check in a case sensitive manner or not |
Références $key.
GeSHi::set_code_style | ( | $style, | |
$preserve_defaults = false |
|||
) |
Sets the style for the actual code. This should be a string containing valid stylesheet declarations. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
Note: Use this method to override any style changes you made to the line numbers if you are using line numbers, else the line of code will have the same style as the line number! Consult the GeSHi documentation for more information about this.
string | The style to use for actual code |
boolean | Whether to merge the current styles with the new styles |
Références $style.
GeSHi::set_comments_highlighting | ( | $key, | |
$flag = true |
|||
) |
Turns highlighting on/off for comment groups
int | The key of the comment group to turn on or off |
boolean | Whether to turn highlighting for that group on or off |
Références $key.
GeSHi::set_comments_style | ( | $key, | |
$style, | |||
$preserve_defaults = false |
|||
) |
Sets the styles for comment groups. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
int | The key of the comment group to change the styles of |
string | The style to make the comments |
boolean | Whether to merge the new styles with the old or just to overwrite them |
GeSHi::set_encoding | ( | $encoding | ) |
Sets the encoding used for htmlspecialchars(), for international support.
NOTE: This is not needed for now because htmlspecialchars() is not being used (it has a security hole in PHP4 that has not been patched). Maybe in a future version it may make a return for speed reasons, but I doubt it.
string | The encoding to use for the source |
Références $encoding.
GeSHi::set_escape_characters_highlighting | ( | $flag = true | ) |
Turns highlighting on/off for escaped characters
boolean | Whether to turn highlighting for escape characters on or off |
GeSHi::set_escape_characters_style | ( | $style, | |
$preserve_defaults = false , |
|||
$group = 0 |
|||
) |
Sets the styles for escaped characters. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
string | The style to make the escape characters |
boolean | Whether to merge the new styles with the old or just to overwrite them |
Références $style.
GeSHi::set_footer_content | ( | $content | ) |
Sets the content of the footer block
string | The content of the footer block |
GeSHi::set_footer_content_style | ( | $style | ) |
Sets the style for the footer content
string | The style for the footer content |
Références $style.
GeSHi::set_header_content | ( | $content | ) |
Sets the content of the header block
string | The content of the header block |
GeSHi::set_header_content_style | ( | $style | ) |
Sets the style for the header content
string | The style for the header content |
Références $style.
GeSHi::set_header_type | ( | $type | ) |
Sets the type of header to be used.
If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This means more source code but more control over tab width and line-wrapping. GESHI_HEADER_PRE means that a "pre" is used - less source, but less control. Default is GESHI_HEADER_PRE.
From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code should be outputted.
int | The type of header to be used |
Références $type, error(), GESHI_ERROR_INVALID_HEADER_TYPE, GESHI_HEADER_DIV, GESHI_HEADER_NONE, GESHI_HEADER_PRE, GESHI_HEADER_PRE_TABLE, et GESHI_HEADER_PRE_VALID.
GeSHi::set_highlight_lines_extra_style | ( | $styles | ) |
Sets the style for extra-highlighted lines
string | The style for extra-highlighted lines |
GeSHi::set_important_styles | ( | $styles | ) |
Sets styles for important parts of the code
string | The styles to use on important parts of the code |
GeSHi::set_keyword_group_highlighting | ( | $key, | |
$flag = true |
|||
) |
Turns highlighting on/off for a keyword group
int | The key of the keyword group to turn on or off |
boolean | Whether to turn highlighting for that group on or off |
Références $key.
GeSHi::set_keyword_group_style | ( | $key, | |
$style, | |||
$preserve_defaults = false |
|||
) |
Sets the style for a keyword group. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
int | The key of the keyword group to change the styles of |
string | The style to make the keywords |
boolean | Whether to merge the new styles with the old or just to overwrite them |
GeSHi::set_language | ( | $language, | |
$force_reset = false |
|||
) |
Sets the language for this object
string | The name of the language to use |
Références $language, error(), GESHI_ERROR_NO_SUCH_LANG, GESHI_NEVER, language, et load_language().
Référencé par GeSHi(), load_from_file(), et set_language_path().
GeSHi::set_language_path | ( | $path | ) |
Sets the path to the directory containing the language files. Note that this path is relative to the directory of the script that included geshi.php, NOT geshi.php itself.
string | The path to the language directory |
Références $path, DIRECTORY_SEPARATOR, language, et set_language().
Référencé par GeSHi().
GeSHi::set_line_ending | ( | $line_ending | ) |
GeSHi::set_line_style | ( | $style1, | |
$style2 = '' , |
|||
$preserve_defaults = false |
|||
) |
Sets the styles for the line numbers.
string | The style for the line numbers that are "normal" |
string|boolean | If a string, this is the style of the line numbers that are "fancy", otherwise if boolean then this defines whether the normal styles should be merged with the new normal styles or not |
boolean | If set, is the flag for whether to merge the "fancy" styles with the current styles or not |
GeSHi::set_link_styles | ( | $type, | |
$styles | |||
) |
Sets styles for links in code
int | A constant that specifies what state the style is being set for - e.g. :hover or :visited |
string | The styles to use for that state |
Références $type.
GeSHi::set_link_target | ( | $target | ) |
Sets the target for links in code
string | The target for links in the code, e.g. _blank |
Références $target.
GeSHi::set_methods_highlighting | ( | $flag | ) |
Turns highlighting on/off for methods
boolean | Whether to turn highlighting for methods on or off |
GeSHi::set_methods_style | ( | $key, | |
$style, | |||
$preserve_defaults = false |
|||
) |
Sets the styles for methods. $key is a number that references the appropriate "object splitter" - see the language file for the language you are highlighting to get this number. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
int | The key of the object splitter to change the styles of |
string | The style to make the methods |
boolean | Whether to merge the new styles with the old or just to overwrite them |
GeSHi::set_numbers_highlighting | ( | $flag | ) |
Turns highlighting on/off for numbers
boolean | Whether to turn highlighting for numbers on or off |
GeSHi::set_numbers_style | ( | $style, | |
$preserve_defaults = false , |
|||
$group = 0 |
|||
) |
Sets the styles for numbers. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
string | The style to make the numbers |
boolean | Whether to merge the new styles with the old or just to overwrite them |
int | Tells the group of numbers for which style should be set. |
Références $style.
GeSHi::set_overall_class | ( | $class | ) |
Sets the overall classname for this block of code. This class can then be used in a stylesheet to style this object's output
string | The class name to use for this block of code |
Références $class.
GeSHi::set_overall_id | ( | $id | ) |
Sets the overall id for this block of code. This id can then be used in a stylesheet to style this object's output
string | The ID to use for this block of code |
Références $id.
GeSHi::set_overall_style | ( | $style, | |
$preserve_defaults = false |
|||
) |
Sets the styles for the code that will be outputted when this object is parsed. The style should be a string of valid stylesheet declarations
string | The overall style for the outputted code block |
boolean | Whether to merge the styles with the current styles or not |
Références $style.
GeSHi::set_regexps_highlighting | ( | $key, | |
$flag | |||
) |
Turns highlighting on/off for regexps
int | The key of the regular expression group to turn on or off |
boolean | Whether to turn highlighting for the regular expression group on or off |
Références $key.
GeSHi::set_regexps_style | ( | $key, | |
$style, | |||
$preserve_defaults = false |
|||
) |
Sets the styles for regexps. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
string | The style to make the regular expression matches |
boolean | Whether to merge the new styles with the old or just to overwrite them |
GeSHi::set_script_style | ( | $style, | |
$preserve_defaults = false , |
|||
$group = 0 |
|||
) |
Sets the styles for strict code blocks. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
string | The style to make the script blocks |
boolean | Whether to merge the new styles with the old or just to overwrite them |
int | Tells the group of script blocks for which style should be set. |
Références $style.
GeSHi::set_source | ( | $source | ) |
Sets the source code for this object
string | The source code to highlight |
Références $source.
Référencé par GeSHi(), et load_from_file().
GeSHi::set_strings_highlighting | ( | $flag | ) |
Turns highlighting on/off for strings
boolean | Whether to turn highlighting for strings on or off |
GeSHi::set_strings_style | ( | $style, | |
$preserve_defaults = false , |
|||
$group = 0 |
|||
) |
Sets the styles for strings. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
string | The style to make the escape characters |
boolean | Whether to merge the new styles with the old or just to overwrite them |
int | Tells the group of strings for which style should be set. |
Références $style.
GeSHi::set_symbols_highlighting | ( | $flag | ) |
Turns highlighting on/off for symbols
boolean | Whether to turn highlighting for symbols on or off |
Références set_brackets_highlighting().
GeSHi::set_symbols_style | ( | $style, | |
$preserve_defaults = false , |
|||
$group = 0 |
|||
) |
Sets the styles for symbols. If $preserve_defaults is true, then styles are merged with the default styles, with the user defined styles having priority
string | The style to make the symbols |
boolean | Whether to merge the new styles with the old or just to overwrite them |
int | Tells the group of symbols for which style should be set. |
Références $style, et set_brackets_style().
GeSHi::set_tab_width | ( | $width | ) |
Sets how many spaces a tab is substituted for
Widths below zero are ignored
int | The tab width |
Références $width.
GeSHi::set_time | ( | $start_time, | |
$end_time | |||
) |
Sets the time taken to parse the code
microtime | The time when parsing started |
microtime | The time when parsing ended |
Référencé par parse_code().
GeSHi::set_url_for_keyword_group | ( | $group, | |
$url | |||
) |
Sets the base URL to be used for keywords
int | The key of the keyword group to set the URL for |
string | The URL to set for the group. If {FNAME} is in the url somewhere, it is replaced by the keyword that the URL is being made for |
Références $url.
GeSHi::set_use_language_tab_width | ( | $use | ) |
Sets whether or not to use tab-stop width specifed by language
boolean | Whether to use language-specific tab-stop widths |
GeSHi::start_line_numbers_at | ( | $number | ) |
Sets what number line numbers should start at. Should be a positive integer, and will be converted to one.
Warning: Using this method will add the "start" attribute to the <ol> that is used for line numbering. This is not valid XHTML strict, so if that's what you care about then don't use this method. Firefox is getting support for the CSS method of doing this in 1.1 and Opera has support for the CSS method, but (of course) IE doesn't so it's not worth doing it the CSS way yet.
int | The number to start line numbers at |
GeSHi::$_hmr_after = '' |
Référencé par handle_multiline_regexps().
GeSHi::$_hmr_before = '' |
Référencé par handle_multiline_regexps().
GeSHi::$_hmr_key = 0 |
GeSHi::$_hmr_replace = '' |
Référencé par handle_multiline_regexps().
GeSHi::$_kw_replace_group = 0 |
Référencé par handle_keyword_replace().
GeSHi::$_rx_key = 0 |
GeSHi::$add_ids = false |
GeSHi::$allow_multiline_span = true |
Référencé par get_multiline_span(), et parse_code().
GeSHi::$code_style = 'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;' |
GeSHi::$enable_important_blocks = false |
GeSHi::$encoding = 'utf-8' |
Référencé par set_encoding().
GeSHi::$error = false |
GeSHi::$error_messages |
GeSHi::$footer_content = '' |
Référencé par footer().
GeSHi::$footer_content_style = '' |
GeSHi::$force_code_block = false |
GeSHi::$header_content = '' |
Référencé par header().
GeSHi::$header_content_style = '' |
GeSHi::$header_type = GESHI_HEADER_PRE |
GeSHi::$highlight_extra_lines = array() |
GeSHi::$highlight_extra_lines_style = 'background-color: #ffc;' |
Référencé par get_line_style().
GeSHi::$highlight_extra_lines_styles = array() |
GeSHi::$important_styles = 'font-weight: bold; color: red;' |
GeSHi::$keyword_links = true |
GeSHi::$language = '' |
Référencé par GeSHi(), get_language_fullname(), et set_language().
GeSHi::$language_data = array() |
Référencé par load_language().
GeSHi::$language_path = GESHI_LANG_ROOT |
GeSHi::$lexic_permissions |
GeSHi::$line_ending = null |
Référencé par set_line_ending().
GeSHi::$line_nth_row = 0 |
GeSHi::$line_numbers = GESHI_NO_LINE_NUMBERS |
GeSHi::$line_numbers_start = 1 |
GeSHi::$line_style1 = 'font-weight: normal; vertical-align:top;' |
Référencé par finalise().
GeSHi::$line_style2 = 'font-weight: bold; vertical-align:top;' |
Référencé par finalise().
GeSHi::$link_styles = array() |
GeSHi::$link_target = '' |
GeSHi::$loaded_language = '' |
GeSHi::$overall_class = '' |
GeSHi::$overall_id = '' |
GeSHi::$overall_style = 'font-family:monospace;' |
GeSHi::$parse_cache_built = false |
GeSHi::$source = '' |
Référencé par GeSHi(), et set_source().
GeSHi::$strict_mode = false |
GeSHi::$tab_width = 8 |
Référencé par get_real_tab_width(), et indent().
GeSHi::$table_linenumber_style = 'width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;' |
GeSHi::$time = 0 |
Référencé par get_time(), et replace_keywords().
GeSHi::$use_classes = false |
GeSHi::$use_language_tab_width = false |