oxstr.php

Go to the documentation of this file.
00001 <?php
00002 
00011 class oxStr
00012 {
00018     static protected $_oHandler;
00019 
00025     public function __construct()
00026     {
00027     }
00028 
00034     static public function getStr()
00035     {
00036         if (!isset(self::$_oHandler)) {
00037             //let's init now non-static instance of oxStr to get the instance of str handler
00038             self::$_oHandler = oxNew("oxStr")->_getStrHandler();
00039         }
00040 
00041         return self::$_oHandler;
00042     }
00043 
00051     protected function _getStrHandler()
00052     {
00053         if (oxRegistry::getConfig()->isUtf() && function_exists('mb_strlen')) {
00054             return oxNew("oxStrMb");
00055         }
00056 
00057         return oxNew("oxStrRegular");
00058     }
00059 
00060 }