#SyntaxHighlight ZF2 SyntaxHighlight Module
Version 0.0.1 Created by Thuy Dinh Xuan
This ZF2 module simply adds SyntaxHighlight support to your project. It utilizes the GeShi SyntaxHighlight library
To install SyntaxHighlight, simply recursively clone this repository (git clone --recursive
) into your ZF2 modules directory and enable it in your
config/application.config.php
file. That's it!
With this module installed, using SyntaxHighlight in your view scripts is easy:
<?php
$source = '
$foo = 45;
for ( $i = 1; $i < $foo; $i++ ){
echo "$foo\n"; --$foo;
}
';
$language = 'php';
echo $this->highlight($source, $language);
?>
NOTE: For more information you can found in documents
- Configuration options
SyntaxHighlight is released under the New BSD-2 license. See the included LICENSE file.
GeSHi is released under the GNU GPLv2