OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxstr.php
Go to the documentation of this file.
1 <?php
2 
11 class oxStr
12 {
18  static protected $_oHandler;
19 
25  public function __construct()
26  {
27  }
28 
34  static public function getStr()
35  {
36  if (!isset(self::$_oHandler)) {
37  //let's init now non-static instance of oxStr to get the instance of str handler
38  self::$_oHandler = oxNew("oxStr")->_getStrHandler();
39  }
40 
41  return self::$_oHandler;
42  }
43 
51  protected function _getStrHandler()
52  {
53  if (oxRegistry::getConfig()->isUtf() && function_exists('mb_strlen')) {
54  return oxNew("oxStrMb");
55  }
56 
57  return oxNew("oxStrRegular");
58  }
59 
60 }