OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxUtilsString Class Reference
+ Collaboration diagram for oxUtilsString:

Public Member Functions

 __construct ()
 prepareCSVField ($sInField)
 minimizeTruncateString ($sString, $iLength)
 prepareStrForSearch ($sSearchStr)

Static Public Member Functions

static getInstance ()

Static Private Attributes

static $_instance = null

Detailed Description

String manipulation class

Definition at line 6 of file oxutilsstring.php.

Constructor & Destructor Documentation

oxUtilsString::__construct ( )

Class constructor. The constructor is defined in order to be possible to call parent::__construct() in modules.

Returns
null;

Definition at line 20 of file oxutilsstring.php.

Member Function Documentation

static oxUtilsString::getInstance ( )
static

Returns string manipulation utility instance

Deprecated:
since v5.0 (2012-08-10); Use oxRegistry::get("oxUtilsString") instead.
Returns
oxUtilsString

Definition at line 31 of file oxutilsstring.php.

oxUtilsString::minimizeTruncateString (   $sString,
  $iLength 
)

shortens a string to a size $iLenght, multiple spaces are removed and leading and ending whitespaces are removed. If string ends with "," then "," is removed from string end

Parameters
string$sStringinput string
int$iLengthmaximum length of result string , -1 -> no truncation
Returns
string a string of maximum length $iLength without multiple spaces and commas

Definition at line 65 of file oxutilsstring.php.

oxUtilsString::prepareCSVField (   $sInField)

Prepares passed string for CSV format

Parameters
string$sInFieldString to prepare
Returns
string

Definition at line 44 of file oxutilsstring.php.

oxUtilsString::prepareStrForSearch (   $sSearchStr)

Prepares and returns string for search engines.

Parameters
string$sSearchStrString to prepare for search engines
Returns
string

Definition at line 88 of file oxutilsstring.php.

Member Data Documentation

oxUtilsString::$_instance = null
staticprivate

Definition at line 13 of file oxutilsstring.php.


The documentation for this class was generated from the following file: