PEEL Shopping
Open source ecommerce : PEEL Shopping
modifiercompiler.count_words.php
Go to the documentation of this file.
1 <?php
21 function smarty_modifiercompiler_count_words($params, $compiler)
22 {
23  if (Smarty::$_MBSTRING) {
24  // return 'preg_match_all(\'#[\w\pL]+#' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)';
25  // expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592
26  return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)';
27  }
28  // no MBString fallback
29  return 'str_word_count(' . $params[0] . ')';
30 }
31 
32 ?>
static $_UTF8_MODIFIER
Flag denoting if PCRE should run in UTF-8 mode.
static $_MBSTRING
Flag denoting if Multibyte String functions are available.
smarty_modifiercompiler_count_words($params, $compiler)
Smarty count_words modifier plugin.

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:16 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.