TwistPHP Documentation

file

File path: dist/twist/Core/Models/String/SyntaxHighlight.model.php
Namespace: Twist\Core\Models\String
Extends:

fileGet the contents of a file and highlight the code within the file, set a range above and below a focus point (Line No)

Parameters

Name Type Description
$dirFilestringn/a
[$strOutputType = 'plain']stringn/a
[$intFocusLineNo = null]integern/a
[$intFocusRange = 3]integern/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$dirFile '/home/user/public_html/twist';
$strOutputType 'plain';
$intFocusLineNo null;
$intFocusRange 3;

//Call the function file with the example vars
\Twist\Core\Models\String\SyntaxHighlight::file($dirFile$strOutputType$intFocusLineNo$intFocusRange);