Formats a value as string.
public static formatValue ( mixed $value ) : string | ||
$value | mixed | The value. |
return | string | The value as string. |
/** * {@inheritdoc} */ public function toString() { return 'contains(' . StringUtil::formatValue($this->comparedValue) . ')'; }
/** * {@inheritdoc} */ public function toString() { return '===' . StringUtil::formatValue($this->comparedValue); }
/** * {@inheritdoc} */ public function toString() { return 'startsWith(' . StringUtil::formatValue($this->acceptedPrefix) . ')'; }
/** * {@inheritdoc} */ public function toString() { return 'endsWith(' . StringUtil::formatValue($this->acceptedSuffix) . ')'; }
/** * {@inheritdoc} */ public function toString() { return 'matches(' . StringUtil::formatValue($this->regExp) . ')'; }
/** * {@inheritdoc} */ public function toString() { return 'keyExists(' . StringUtil::formatValue($this->key) . ')'; }
/** * {@inheritdoc} */ public function toString() { $values = array_map(function ($value) { return StringUtil::formatValue($value); }, $this->acceptedValues); return 'in(' . implode(', ', $values) . ')'; }