classes/Text.md

Text

Overview:

Text contains string utilities: simple templating, slugify, and accent removal.

Use Text for lightweight string templating, slug generation, accent normalization, and targeted substring extraction.

Public API:

Example:

echo Text::render('Hello {{ name }}', ['name' => 'Ada']);

The Text module contains text related utility.

Render a string template

---

Fast string templating, it uses a dot notation path for retrieving value.

Values must be enclosed in {{ }} double curly braces.

echo Text::render('Your IP is : {{ server.REMOTE_HOST }}',[
  'server' => $_SERVER
]);
Your IP is : 192.30.252.131