src/Translator.php
protected function parseParameters($text, array $parameters = [])
	{
		// no params no replacement
		if ($parameters === null || count($parameters) == 0)
		{
			return $text;
		}

		$parameterNames = [];
		$parameterValues = [];
		foreach ($parameters as $parameterName => $parameterValue)
		{
			$parameterNames[] = $this->getPlaceholderPrefix() . $parameterName . $this->getPlaceholderSuffix();
			$parameterValues[] = $parameterValue;
		}

		return str_ireplace($parameterNames, $parameterValues, $text);
	}
protected function parseParameters($text, array $parameters = [])
	{
		// no params no replacement
		if ($parameters === null || count($parameters) == 0)
		{
			return $text;
		}

		$parameterNames = [];
		$parameterValues = [];
		foreach ($parameters as $parameterName => $parameterValue)
		{
			$parameterNames[] = $this->getPlaceholderPrefix() . $parameterName . $this->getPlaceholderSuffix();
			$parameterValues[] = $parameterValue;
		}

		return str_ireplace($parameterNames, $parameterValues, $text);
	}
protected function parseParameters ( $ text , array $ parameters = [ ] ) { // no params no replacement if ( $ parameters === null || count ( $ parameters ) == 0 ) { return $ text ; } $ parameterNames = [ ] ; $ parameterValues = [ ] ; foreach ( $ parameters as $ parameterName => $ parameterValue ) { $ parameterNames [ ] = $ this -> getPlaceholderPrefix ( ) . $ parameterName . $ this -> getPlaceholderSuffix ( ) ; $ parameterValues [ ] = $ parameterValue ; } return str_ireplace ( $ parameterNames , $ parameterValues , $ text ) ; }
parse the given parameters in the $text if there is a placeholder for the parameters

@param string $text
@param string[] $parameters
@return string
parse the given parameters in the $text if there is a placeholder for the parameters