formatValue() public static method

Formats a value as string.
public static formatValue ( mixed $value ) : string
$value mixed The value.
return string The value as string.
Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     return 'contains(' . StringUtil::formatValue($this->comparedValue) . ')';
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     return '===' . StringUtil::formatValue($this->comparedValue);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     return 'startsWith(' . StringUtil::formatValue($this->acceptedPrefix) . ')';
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     return 'endsWith(' . StringUtil::formatValue($this->acceptedSuffix) . ')';
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     return 'matches(' . StringUtil::formatValue($this->regExp) . ')';
 }
Ejemplo n.º 6
0
 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     return 'keyExists(' . StringUtil::formatValue($this->key) . ')';
 }
Ejemplo n.º 7
0
 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     $values = array_map(function ($value) {
         return StringUtil::formatValue($value);
     }, $this->acceptedValues);
     return 'in(' . implode(', ', $values) . ')';
 }