M1\Vars\Variables\VariableProvider::parse PHP Method

parse() public method

Parses the string for the types of variables
public parse ( string $value ) : string
$value string The string to parse
return string The parsed variable
    public function parse($value)
    {
        foreach (self::$variable_types as $variable_type) {
            $value = $this->typeParse($value, $variable_type);
        }
        return $value;
    }

Usage Example

Beispiel #1
0
 /**
  * Parses the text for option and environment replacements and replaces the text
  *
  * @param string $text The text to be parsed
  *
  * @return string|null The parsed string
  */
 private function parseText($text)
 {
     if (is_string($text)) {
         return $this->variables->parse($text);
     }
     return $text;
 }