OXID eShop CE  4.9.6
 All Classes Files Functions Variables Pages
oxTagSet Class Reference
+ Inheritance diagram for oxTagSet:
+ Collaboration diagram for oxTagSet:

Public Member Functions

 setSeparator ($sSeparator)
 getSeparator ()
 set ($sTags, $blPrepare=true)
 get ()
 getInvalidTags ()
 add ($sTags, $blPrepare=true)
 addTag ($mTag, $blPrepare=true)
 clear ()
 formString ()
 __toString ()
 slice ($offset, $length)
 sort ()
 sortByHitCount ()
 current ()
 next ()
 key ()
 valid ()
 rewind ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _formTag ($mTag, $blPrepare=true)
 _tagHitsCmp ($oTag1, $oTag2)

Protected Attributes

 $_sSeparator = ','
 $_aTags = array()
 $_aInvalidTags = array()

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Class dedicated to article tags handling. Is responsible for saving, returning and adding tags for given article.

Definition at line 9 of file oxtagset.php.

Member Function Documentation

oxTagSet::__toString ( )

Returns tag list as string

Returns
string

Definition at line 155 of file oxtagset.php.

oxTagSet::_formTag (   $mTag,
  $blPrepare = true 
)
protected

Forms and returns tag

Parameters
mixed$mTagtag as a string or as oxTag object
bool$blPrepareif false, tag will not be parsed and stored as is
Returns
oxTag

Definition at line 246 of file oxtagset.php.

oxTagSet::_tagHitsCmp (   $oTag1,
  $oTag2 
)
protected

Compares two tags by hit count

Parameters
oxTag$oTag1tag to compare
oxTag$oTag2tag to compare
Returns
int < 0 if tag1 is less than tag2; > 0 if tag1 is greater than tag2, and 0 if they are equal.

Definition at line 266 of file oxtagset.php.

oxTagSet::add (   $sTags,
  $blPrepare = true 
)

Adds tag

Parameters
string$sTagstags to add to list
bool$blPrepareif false, separate tags will not be parsed and stored as is

Definition at line 91 of file oxtagset.php.

oxTagSet::addTag (   $mTag,
  $blPrepare = true 
)

Adds tag

Parameters
mixed$mTagtag as a string or as oxTag object
bool$blPrepareif false, tag will not be parsed and stored as is
Returns
bool

Definition at line 107 of file oxtagset.php.

oxTagSet::clear ( )

Clears tags set

Definition at line 130 of file oxtagset.php.

oxTagSet::current ( )

Return the current element

Returns
oxTag

Definition at line 197 of file oxtagset.php.

oxTagSet::formString ( )

Returns formed string of tags

Returns
string

Definition at line 140 of file oxtagset.php.

oxTagSet::get ( )

Returns article tags set string

Returns
string;

Definition at line 70 of file oxtagset.php.

oxTagSet::getInvalidTags ( )

Returns article tags set string

Returns
string;

Definition at line 80 of file oxtagset.php.

oxTagSet::getSeparator ( )

Returns tag separator

Returns
mixed

Definition at line 48 of file oxtagset.php.

oxTagSet::key ( )

Return the key of the current element

Returns
mixed scalar on success, or null on failure.

Definition at line 215 of file oxtagset.php.

oxTagSet::next ( )

Return the key of the current element

Definition at line 205 of file oxtagset.php.

oxTagSet::rewind ( )

Rewind the Iterator to the first element

Definition at line 233 of file oxtagset.php.

oxTagSet::set (   $sTags,
  $blPrepare = true 
)

Clears the list and adds specified tags

Parameters
string$sTagsarticle tag
bool$blPrepareif false, separate tags will not be parsed and stored as is

Definition at line 59 of file oxtagset.php.

oxTagSet::setSeparator (   $sSeparator)

Sets tag separator

Parameters
string$sSeparatortags separator character

Definition at line 38 of file oxtagset.php.

oxTagSet::slice (   $offset,
  $length 
)

Slices tags from the list

Parameters
int$offsetoffset
int$lengthlength of tags set
Returns
array

Definition at line 168 of file oxtagset.php.

oxTagSet::sort ( )

Sorts current tag set

Definition at line 178 of file oxtagset.php.

oxTagSet::sortByHitCount ( )

Sorts current tag set

Definition at line 187 of file oxtagset.php.

oxTagSet::valid ( )

Checks if current position is valid

Returns
boolean Returns true on success or false on failure.

Definition at line 225 of file oxtagset.php.

Member Data Documentation

oxTagSet::$_aInvalidTags = array()
protected

Definition at line 31 of file oxtagset.php.

oxTagSet::$_aTags = array()
protected

Definition at line 24 of file oxtagset.php.

oxTagSet::$_sSeparator = ','
protected

Definition at line 17 of file oxtagset.php.


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