lithium\util\StringDeprecated::insert()

public static method
Replaced by `lithium\util\Text::insert()`.

Replaces variable placeholders inside a string with any given data. Each key in the $data array corresponds to a variable placeholder name in $str.

Parameters

  • string $str

    A string containing variable place-holders.

  • array $data

    A key, value array where each key stands for a place-holder variable name to be replaced with value.

  • array $options

Returns

string

Source

	public static function insert($str, array $data, array $options = []) {
		$message  = "lithium\util\String::insert() has been deprecated in favor of ";
		$message .= "lithium\util\Text::insert().";
		trigger_error($message, E_USER_DEPRECATED);

		return Text::insert($str, $data, $options);
	}