mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating formatting on doc block for string insert.
This commit is contained in:
parent
6dbb8690ad
commit
ca6ca39467
1 changed files with 9 additions and 8 deletions
|
@ -200,16 +200,17 @@ class String {
|
|||
/**
|
||||
* Replaces variable placeholders inside a $str with any given $data. Each key in the $data array
|
||||
* corresponds to a variable placeholder name in $str.
|
||||
* Example: String::insert(':name is :age years old.', array('name' => 'Bob', '65'));
|
||||
* Example: `String::insert(':name is :age years old.', array('name' => 'Bob', '65'));`
|
||||
* Returns: Bob is 65 years old.
|
||||
*
|
||||
* Available $options are:
|
||||
* before: The character or string in front of the name of the variable placeholder (Defaults to ':')
|
||||
* after: The character or string after the name of the variable placeholder (Defaults to null)
|
||||
* escape: The character or string used to escape the before character / string (Defaults to '\')
|
||||
* format: A regex to use for matching variable placeholders. Default is: '/(?<!\\)\:%s/'
|
||||
*
|
||||
* - before: The character or string in front of the name of the variable placeholder (Defaults to `:`)
|
||||
* - after: The character or string after the name of the variable placeholder (Defaults to null)
|
||||
* - escape: The character or string used to escape the before character / string (Defaults to `\`)
|
||||
* - format: A regex to use for matching variable placeholders. Default is: `/(?<!\\)\:%s/`
|
||||
* (Overwrites before, after, breaks escape / clean)
|
||||
* clean: A boolean or array with instructions for String::cleanInsert
|
||||
* - clean: A boolean or array with instructions for String::cleanInsert
|
||||
*
|
||||
* @param string $str A string containing variable placeholders
|
||||
* @param string $data A key => val array where each key stands for a placeholder variable name
|
||||
|
|
Loading…
Reference in a new issue