Public Member Functions | Protected Attributes

oxTag Class Reference

Inheritance diagram for oxTag:
Collaboration diagram for oxTag:

List of all members.

Public Member Functions

 __construct ($sTag=null)
 setMaxLength ($iTagMaxLength)
 getMaxLength ()
 set ($sTag, $blPrepare=true)
 get ()
 setHitCount ($iHitCount)
 getHitCount ()
 increaseHitCount ()
 isValid ()
 getLink ()
 setLink ($sTagLink=null)
 getTitle ()
 __toString ()
 prepare ($sTag)
 stripMetaChars ($sText)
 formLink ($sTag)
 addUnderscores ()
 removeUnderscores ()

Protected Attributes

 $_sTag = ''
 $_aForbiddenTags
 $_sTagLink = null
 $_iTagMaxLength = 60
 $_iHitCount = 1
 $_aMetaChars = array('+','-','>','<','(',')','~','*','"','\'','\\','[',']','{','}',';',':','.','/','|','!','@','#','$','%','^','&','?','=','`')

Detailed Description

Class dedicated to tags handling

Definition at line 10 of file oxtag.php.


Constructor & Destructor Documentation

oxTag.__construct ( sTag = null  ) 

Sets tag value

Parameters:
string $sTag tag value

Definition at line 62 of file oxtag.php.


Member Function Documentation

oxTag.__toString (  ) 

Renders tag

Returns:
string

Definition at line 202 of file oxtag.php.

oxTag.addUnderscores (  ) 

Adds dashes to too short tag words, so that they would be equal to minTagLength

Returns:
void

Definition at line 271 of file oxtag.php.

oxTag.formLink ( sTag  ) 

Returns tag url (seo or dynamic depends on shop mode)

Parameters:
string $sTag tag
Returns:
string

Definition at line 253 of file oxtag.php.

oxTag.get (  ) 

Sets tag value

Returns:
string Tag value

Definition at line 111 of file oxtag.php.

oxTag.getHitCount (  ) 

Returns tag size value

Returns:
int Tag size value

Definition at line 133 of file oxtag.php.

oxTag.getLink (  ) 

Returns tag url (seo or dynamic depends on shop mode)

Returns:
string

Definition at line 167 of file oxtag.php.

oxTag.getMaxLength (  ) 

Returns maximum tag length

Returns:
int

Definition at line 87 of file oxtag.php.

oxTag.getTitle (  ) 

Returns html safe tag title

Returns:
string

Definition at line 192 of file oxtag.php.

oxTag.increaseHitCount (  ) 

Increases tag size value

Returns:
void

Definition at line 143 of file oxtag.php.

oxTag.isValid (  ) 

Checks if tag is valid

Returns:
bool

Definition at line 153 of file oxtag.php.

oxTag.prepare ( sTag  ) 

Takes tag string, checks its length and makes longer tag shorter if needed. Also trims it and removes unnecessary characters.

Parameters:
string $sTag tag value
Returns:
object oxTag

Definition at line 215 of file oxtag.php.

oxTag.removeUnderscores (  ) 

Removes dashes from tag words.

Returns:
string

Definition at line 290 of file oxtag.php.

oxTag.set ( sTag,
blPrepare = true 
)

Sets tag value

Parameters:
string $sTag Tag value
bool $blPrepare if false, no checks will be done when setting
Returns:
null

Definition at line 100 of file oxtag.php.

oxTag.setHitCount ( iHitCount  ) 

Sets tag size value

Parameters:
int $iHitCount size of tag
Returns:
void

Definition at line 123 of file oxtag.php.

oxTag.setLink ( sTagLink = null  ) 

Sets tag url. If nothing is passed, link is reset to null

Parameters:
string $sTagLink formed tag link
Returns:
string

Definition at line 182 of file oxtag.php.

oxTag.setMaxLength ( iTagMaxLength  ) 

Sets maximum tag length

Parameters:
int $iTagMaxLength Tag maximum length
Returns:
int

Definition at line 77 of file oxtag.php.

oxTag.stripMetaChars ( sText  ) 

Changes any mysql specific meta characters with spaces

Parameters:
string $sText given text
Returns:
string

Definition at line 233 of file oxtag.php.


Member Data Documentation

oxTag.$_aForbiddenTags [protected]
Initial value:
 array(
        'admin', 'application', 'core', 'export', 'modules', 'out', 'setup', 'tmp'
    )

Forbidden tags

Definition at line 23 of file oxtag.php.

oxTag.$_aMetaChars = array('+','-','>','<','(',')','~','*','"','\'','\\','[',']','{','}',';',':','.','/','|','!','@','#','$','%','^','&','?','=','`') [protected]

Definition at line 55 of file oxtag.php.

oxTag.$_iHitCount = 1 [protected]

Definition at line 47 of file oxtag.php.

oxTag.$_iTagMaxLength = 60 [protected]

Definition at line 40 of file oxtag.php.

oxTag.$_sTag = '' [protected]

Definition at line 18 of file oxtag.php.

oxTag.$_sTagLink = null [protected]

Definition at line 32 of file oxtag.php.


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