Copied!
  • todo In highlight.php 10.x, replace the @final attribute with the `final` keyword.
  • final
  • internal // Backward compatibility properties
  • property Highlight\Mode $mode (DEPRECATED) All properties traditionally inside of $mode are now available directly from this class.
  • property bool $caseInsensitive (DEPRECATED) Due to compatibility requirements with highlight.js, use `case_insensitive` instead.
Cloneable Instantiable
Properties
public $name
 
  • var string
Methods
public __construct ( $lang , $filePath )
 
  • throws InvalidArgumentException when the given $filePath is inaccessible
public __get ( $name )
 
public static Highlight\Mode :: _normalize ( $obj )
 

Fill in the missing properties that this Mode does not have.

  • internal
  • since 9.16.0.0
  • return void
public compile ( $safeMode )
 

Compile the Language definition.

  • since 9.17.1.0The 'safeMode' parameter was added.
  • return void
Properties
private static $COMMON_KEYWORDS = [ 'of' , 'and' , 'for' , 'in' , 'not' , 'or' , 'if' , 'then' ]
 
  • var string []
private $mode
 
Methods
private commonKeyword ( $word )
 
  • return bool
private compileKeywords ( $rawKeywords , $caseSensitive )
 
  • return array | int>>
private compileMode ( $mode , $parent = NULL )
 
  • return void
private dependencyOnParent ( $mode )
 
  • return bool
private expandOrCloneMode ( $mode )
 
  • return array | Mode>
private inherit ( $params , $_ = [ ] )
 

Performs a shallow merge of multiple objects into one.

private langRe ( $value , $global = false )
private scoreForKeyword ( $keyword , $providedScore )
 
  • return int
private splitAndCompile ( $className , $str , array $compiledKeywords , $caseSensitive )
 
  • return void
Properties
private static $COMMON_KEYWORDS = [ 'of' , 'and' , 'for' , 'in' , 'not' , 'or' , 'if' , 'then' ]
 
  • var string []
Methods
public static Highlight\Mode :: _normalize ( $obj )
 

Fill in the missing properties that this Mode does not have.

  • internal
  • since 9.16.0.0
  • return void
© 2020 Bruce Wells
Search Namespaces \ Classes
Configuration Numbers (0-9.) only