• 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.
CloneableInstantiable
ExtendsHighlight\Mode
stdClass
Properties
public $name
 
  • var string
Methods
public __construct( $lang, $filePath)
 
  • throws InvalidArgumentException when the given $filePath is inaccessible
public __get( $name)
 
  • return bool|\Mode|null
public static Highlight\Mode::_handleDeprecations( $obj)
 

Set any deprecated properties values to their replacement values.

  • internal
  • return void
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
public complete( $e)
 
  • todo Remove in highlight.php 10.x
  • deprecated 9.16.0This method should never have been exposed publicly as part of the API.
  • return void
Properties
private static $COMMON_KEYWORDS = ['of', 'and', 'for', 'in', 'not', 'or', 'if', 'then']
 
  • var string[]
private $mode
 
  • var Mode|null
Methods
private commonKeyword( $word)
 
  • return bool
private compileKeywords( $rawKeywords, $caseSensitive)
 
  • return array>
private compileMode( $mode, $parent = NULL)
 
  • return void
private dependencyOnParent( $mode)
 
  • return bool
private expandOrCloneMode( $mode)
 
  • return array
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::_handleDeprecations( $obj)
 

Set any deprecated properties values to their replacement values.

  • internal
  • return void
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
ConfigurationNumbers (0-9.) only