Collection of methods for parsing Segments.

CloneableInstantiable
Methods
public static parseSegments( $path)
 
Parses a path into an array of segments.

  • return array
  • throws ValidationException
Methods
private static isValidLiteral( $literal)
 
Check if $literal is a valid segment literal. Segment literals may only contain numbers, letters, and any of the following: .-~_

  • return bool
private static parse( $segmentString, $path, $index)
 


private static parseError( $path, $index, $reason)
private static parseLiteralFromPath( $literal, $path, $index)
 


  • return string
  • throws ValidationException
private static parseSegmentFromPath( $path, $index)
 
Given a path and an index, reads a Segment from the path and updates the index.

private static parseVariableSegment( $segmentStringWithoutBraces)
 


Methods
private static isValidLiteral( $literal)
 
Check if $literal is a valid segment literal. Segment literals may only contain numbers, letters, and any of the following: .-~_

  • return bool
private static parse( $segmentString, $path, $index)
 


private static parseError( $path, $index, $reason)
private static parseLiteralFromPath( $literal, $path, $index)
 


  • return string
  • throws ValidationException
private static parseSegmentFromPath( $path, $index)
 
Given a path and an index, reads a Segment from the path and updates the index.

public static parseSegments( $path)
 
Parses a path into an array of segments.

  • return array
  • throws ValidationException
private static parseVariableSegment( $segmentStringWithoutBraces)
 


© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only