Public Member Functions | Protected Member Functions | Protected Attributes

oxTagSet Class Reference

Inheritance diagram for oxTagSet:
Collaboration diagram for oxTagSet:

List of all members.

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 ()

Protected Member Functions

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

Protected Attributes

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

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 160 of file oxtagset.php.

oxTagSet._formTag ( mTag,
blPrepare = true 
) [protected]

Forms and returns tag

Parameters:
mixed $mTag tag as a string or as oxTag object
bool $blPrepare if false, tag will not be parsed and stored as is
Returns:
oxTag

Definition at line 258 of file oxtagset.php.

oxTagSet._tagHitsCmp ( oTag1,
oTag2 
) [protected]

Compares two tags by hitcount

Parameters:
oxTag $oTag1 tag to compare
oxTag $oTag2 tag 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 277 of file oxtagset.php.

oxTagSet.add ( sTags,
blPrepare = true 
)

Adds tag

Parameters:
string $sTags tags to add to list
bool $blPrepare if false, separate tags will not be parsed and stored as is
Returns:
bool

Definition at line 97 of file oxtagset.php.

oxTagSet.addTag ( mTag,
blPrepare = true 
)

Adds tag

Parameters:
mixed $mTag tag as a string or as oxTag object
bool $blPrepare if false, tag will not be parsed and stored as is
Returns:
bool

Definition at line 113 of file oxtagset.php.

oxTagSet.clear (  ) 

Clears tags set

Returns:
null

Definition at line 136 of file oxtagset.php.

oxTagSet.current (  ) 

Return the current element

Returns:
oxTag

Definition at line 205 of file oxtagset.php.

oxTagSet.formString (  ) 

Returns formed string of tags

Returns:
string

Definition at line 146 of file oxtagset.php.

oxTagSet.get (  ) 

Returns article tags set string

Returns:
string;

Definition at line 74 of file oxtagset.php.

oxTagSet.getInvalidTags (  ) 

Returns article tags set string

Returns:
string;

Definition at line 84 of file oxtagset.php.

oxTagSet.getSeparator (  ) 

Returns tag separator

Returns:
mixed

Definition at line 50 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 225 of file oxtagset.php.

oxTagSet.next (  ) 

Return the key of the current element

Returns:
void

Definition at line 215 of file oxtagset.php.

oxTagSet.rewind (  ) 

Rewind the Iterator to the first element

Returns:
void

Definition at line 245 of file oxtagset.php.

oxTagSet.set ( sTags,
blPrepare = true 
)

Clears the list and adds specified tags

Parameters:
string $sTags article tag
bool $blPrepare if false, separate tags will not be parsed and stored as is
Returns:
null

Definition at line 63 of file oxtagset.php.

oxTagSet.setSeparator ( sSeparator  ) 

Sets tag separator

Parameters:
string $sSeparator tags separator character
Returns:
mixed

Definition at line 40 of file oxtagset.php.

oxTagSet.slice ( offset,
length 
)

Slices tags from the list

Parameters:
int $offset offset
int $length length of tags set
Returns:
array

Definition at line 173 of file oxtagset.php.

oxTagSet.sort (  ) 

Sorts current tag set

Returns:
array

Definition at line 184 of file oxtagset.php.

oxTagSet.sortByHitCount (  ) 

Sorts current tag set

Returns:
array

Definition at line 195 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 235 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: