ICanBoogie/Common v1.2.2.1
  • Namespace
  • Function

Namespaces

  • ICanBoogie

Classes

  • FormattedString

Interfaces

  • ToArray
  • ToArrayRecursive

Traits

  • ToArrayRecursiveTrait

Exceptions

  • OffsetError
  • OffsetNotDefined
  • OffsetNotReadable
  • OffsetNotWritable
  • PropertyError
  • PropertyIsReserved
  • PropertyNotDefined
  • PropertyNotReadable
  • PropertyNotWritable

Functions

  • array_flatten
  • array_insert
  • array_merge_recursive
  • capitalize
  • downcase
  • dump
  • escape
  • escape_all
  • exact_array_merge_recursive
  • format
  • generate_v4_uuid
  • normalize
  • normalize_url_path
  • remove_accents
  • shorten
  • sort_by_weight
  • stable_sort
  • unaccent_compare
  • unaccent_compare_ci
  • upcase

Function format

Formats the given string by replacing placeholders with the values provided.

Namespace: ICanBoogie
Located at helpers.php

Parameters summary

string $str The string to format.
array $args = array() <p>An array of replacements for the placeholders. Occurrences in $str of any key in $args are replaced with the corresponding sanitized value. The sanitization function depends on the first character of the key:</p> <ul> <li>:key: Replace as is. Use this for text that has already been sanitized.</li> <li>!key: Sanitize using the <code>ICanBoogie\escape()</code> function.</li> <li>%key: Sanitize using the <code>ICanBoogie\escape()</code> function and wrap inside a "EM" markup.</li> </ul> <p>Numeric indexes can also be used e.g '\2' or "{2}" are replaced by the value of the index "2".</p>

Return value summary

string string
ICanBoogie/Common v1.2.2.1 API documentation generated by ApiGen