Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
WordWrapper.php
Go to the documentation of this file.
1 <?php
7 
12 {
21  public function wrapWords($source, array $words, $format)
22  {
23  return empty($words)
24  ? $source
25  : preg_replace("/\\b(" . implode('|', $words) . ")\\b/", sprintf($format, '$1'), $source);
26  }
27 }
$source
Definition: source.php:23
$format
Definition: list.phtml:12