HTML_TagCloud
[ class tree: HTML_TagCloud ] [ index: HTML_TagCloud ] [ all elements ]

Class: HTML_TagCloud

Source Location: /HTML_TagCloud-0.2.0/TagCloud.php

Class Overview


HTML Tag Cloud


Author(s):

Version:

  • Release: 0.2.0

Copyright:

  • 2008 Bastian Onken

Variables

Methods


Child classes:

MyTagsCustomCss
MyTagsCustomCss extends HTML_TagCloud
MyTags
MyTags extends HTML_TagCloud

Inherited Variables

Inherited Methods


Class Details

[line 45]
HTML Tag Cloud

HTML_TagCloud enables you to generate a "tag cloud" in HTML.



[ Top ]


Class Variables

$baseFontSize =  24

[line 53]

  • Access: protected

Type:   int


[ Top ]

$cssClass =  'tagcloud'

[line 65]

  • Access: protected

Type:   string


[ Top ]

$epocLevel = array(
        array(
            'earliest' => array(
                'link'    => 'cccccc',
                'visited' => 'cccccc',
                'hover'   => 'cccccc',
                'active'  => 'cccccc',
            ),),array('earlier'=>array('link'=>'9999cc','visited'=>'9999cc','hover'=>'9999cc','active'=>'9999cc',),),array('later'=>array('link'=>'9999ff','visited'=>'9999ff','hover'=>'9999ff','active'=>'9999ff',),),array('latest'=>array('link'=>'0000ff','visited'=>'0000ff','hover'=>'0000ff','active'=>'0000ff',),),)

[line 78]

  • Access: protected

Type:   array


[ Top ]

$fontSizeRange =  12

[line 59]

  • Access: protected

Type:   int


[ Top ]

$sizeSuffix =  'px'

[line 72]

  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 188]

HTML_TagCloud __construct( [int $baseFontSize = null], [int $fontSizeRange = null], [string $latestColor = null], [string $earliestColor = null], [int $thresholds = 4])

Class constructor
  • Since: Method available since Release 0.1.0
  • Access: public

Parameters:

int   $baseFontSize   —  base font size of output tag (option)
int   $fontSizeRange   —  font size range
string   $latestColor   —  color of latest tag (usually dark)
string   $earliestColor   —  color of earliest tag (usually light)
int   $thresholds   —  number of timelines to set up

[ Top ]

addElement   [line 252]

void addElement( [string $name = ''], [string $url = ''], [int $count = 0], [int $timestamp = null])

add a Tag Element to build Tag Cloud
  • Since: Method available since Release 0.1.0
  • Access: public

Parameters:

string   $name   —  tagname
string   $url   —  URL to which the tag leads to
int   $count   —  number of occurrences of this tag
int   $timestamp   —  unixtimestamp

[ Top ]

addElements   [line 274]

void addElements( array $tags)

add a Tag Element to build Tag Cloud
  • Since: Method available since Release 0.1.0
  • Access: public

Parameters:

array   $tags   —  Associative array to $this->_elements

[ Top ]

buildAll   [line 308]

string buildAll( [array $param = array()])

build HTML and CSS at once.
  • Return: HTML and CSS
  • Since: Method available since Release 0.1.0
  • Access: public

Parameters:

array   $param   —  parameters that influence the HTML output

[ Top ]

buildCSS   [line 367]

string buildCSS( )

build CSS part
  • Return: base CSS
  • Since: Method available since Release 0.1.0
  • Access: public

[ Top ]

buildHTML   [line 350]

string buildHTML( [array $param = array()])

build HTML part
  • Return: HTML
  • Since: Method available since Release 0.1.0
  • Access: public

Parameters:

array   $param   —  'limit' => int limit of generation tag num.

[ Top ]

clearElements   [line 290]

void clearElements( )

clear Tag Elements
  • Since: Method available since Release 0.1.0
  • Access: public

[ Top ]

createHTMLTag   [line 482]

string createHTMLTag( array $tag, string $type, float $fontSize)

create a Element of HTML part
  • Return: a Element of Tag HTML
  • Since: Method available since Release 0.1.3
  • Access: protected

Parameters:

array   $tag   —  tagname
string   $type   —  css class of time line param
float   $fontSize   —  size of the font for this tag

[ Top ]

getUid   [line 231]

string getUid( )

returns the unique id of the tag cloud
  • Return: unique id
  • Since: Method available since Release 0.2.0
  • Access: public

[ Top ]

html_and_css   [line 332]

string html_and_css( [array $param = array()])

Alias to buildAll. Compatibilities for Perl Module.
  • Return: HTML and CSS
  • See: HTML_TagCloud::_buildAll
  • Deprecated: Method deprecated in Release 0.1.3
  • Since: Method available since Release 0.1.0
  • Access: public

Parameters:

array   $param   —  'limit' => int limit of generation tag num.

[ Top ]

_createHTMLTag   [line 462]

string _createHTMLTag( array $tag, string $type, float $fontSize)

create a Element of HTML part

deprecated due to wrong function naming: one leading underscore must only be used in private context.

  • Return: a Element of Tag HTML
  • See: HTML_TagCloud::createHTMLTag()
  • Deprecated: Method deprecated in Release 0.1.3
  • Since: Method available since Release 0.1.0
  • Access: protected

Parameters:

array   $tag   —  tagname
string   $type   —  css class of time line param
float   $fontSize   —  size of the font for this tag

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:17:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.