formatValue() public static méthode

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