Represents a segment in a resource template. This is used internally by RelativeResourceTemplate, but is not intended for public use and may change without notice.

  • internal
CloneableInstantiable
Constants
public Google\ApiCore\ResourceTemplate\Segment::DOUBLE_WILDCARD_SEGMENT = 2
public Google\ApiCore\ResourceTemplate\Segment::LITERAL_SEGMENT = 0
public Google\ApiCore\ResourceTemplate\Segment::VARIABLE_SEGMENT = 3
public Google\ApiCore\ResourceTemplate\Segment::WILDCARD_SEGMENT = 1
Methods
public __construct( $segmentType, $value = NULL, $key = NULL, ?Google\ApiCore\ResourceTemplate\RelativeResourceTemplate $template = NULL)
 
Segment constructor.

  • throws ValidationException
public __toString()
 


  • return string A string representation of the segment.
public getKey()
 


  • return string|null
public getSegmentType()
 


  • return int
public getTemplate()
 


  • return RelativeResourceTemplate|null
public getValue()
 


  • return string|null
public matches( $value)
 
Checks if $value matches this Segment.

  • return bool
  • throws ValidationException
Properties
private $key
 


  • var string|null
private $segmentType
 


  • var int
private $stringRepr
 


  • var string
private $template
 


  • var RelativeResourceTemplate|null
private $value
 


  • var string|null
Methods
private static isValidBinding( $binding)
 
Check if $binding is a valid segment binding. Segment bindings may contain any characters except a forward slash ('/'), and may not be empty.

  • return bool
private static isValidDoubleWildcardBinding( $binding)
 
Check if $binding is a valid double wildcard binding. Segment bindings may contain any characters, but may not be empty.

  • return bool
Methods
private static isValidBinding( $binding)
 
Check if $binding is a valid segment binding. Segment bindings may contain any characters except a forward slash ('/'), and may not be empty.

  • return bool
private static isValidDoubleWildcardBinding( $binding)
 
Check if $binding is a valid double wildcard binding. Segment bindings may contain any characters, but may not be empty.

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