trait ValueToStringTrait (View source)

Provides functionality to express a value as string

Methods

string
toolValueToString(mixed $value)

Returns a string representation of the value.

Details

protected string toolValueToString(mixed $value)

Returns a string representation of the value.

  • null value: 'NULL'
  • boolean: 'TRUE', 'FALSE'
  • array: 'Array'
  • scalar: converted-value
  • resource: '(type resource #number)'
  • object with __toString(): result of __toString()
  • object DateTime: ISO 8601 date
  • object: '(className Object)'
  • anonymous function: same as object

Parameters

mixed $value the value to return as a string.

Return Value

string