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

Class: HTML_TagCloud

Source Location: /HTML_TagCloud-0.1.1/TagCloud.php

Class Overview


HTML Tag Cloud


Author(s):

Version:

  • CVS: $Id: TagCloud.php,v 1.1 2006/10/01 05:14:14 shomas Exp $

Copyright:

  • 2006 Shoma Suzuki

Variables

Methods


Child classes:

MyTags
OverRide protected class vars

Inherited Variables

Inherited Methods


Class Details

[line 25]
HTML Tag Cloud

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

PHP version 5

LICENSE: This source file is subject to version 3.0 of the PHP license that is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.



[ Top ]


Class Variables

$baseFontSize =  24

[line 32]

  • Access: protected

Type:   int


[ Top ]

$cssClass =  'tagcloud'

[line 43]

  • 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 56]

  • Access: protected

Type:   array


[ Top ]

$fontSizeRange =  12

[line 37]

  • Access: protected

Type:   int


[ Top ]

$sizeSuffix =  'px'

[line 50]

  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 144]

HTML_TagCloud __construct( [int $baseFontSize = 24], [int $fontSizeRange = 12])

Class constructor
  • Access: public

Parameters:

int   $baseFontSize   —  base font size of output tag (option)
int   $fontSizeRange   —  font size range

[ Top ]

addElement   [line 168]

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

add a Tag Element to build Tag Cloud
  • Access: public

Parameters:

string   $tag   — 
string   $url   — 
int   $count   — 
int   $timestamp   —  unixtimestamp
   $name   — 

[ Top ]

addElements   [line 186]

void addElements( array $tags)

add a Tag Element to build Tag Cloud
  • Access: public

Parameters:

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

[ Top ]

buildAll   [line 213]

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

build HTML and CSS at once.
  • Return: HTML and CSS
  • See: _buidHTMLTags
  • Access: public

Parameters:

array   $param   — 

[ Top ]

buildCSS   [line 258]

string buildCSS( )

build CSS part
  • Return: base CSS
  • Access: public

[ Top ]

buildHTML   [line 244]

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

build HTML part
  • Return: HTML
  • Access: public

Parameters:

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

[ Top ]

clearElements   [line 198]

void clearElements( )

clear Tag Elements
  • Access: public

[ Top ]

html_and_css   [line 230]

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

Alias to buildAll. Compatibilities for Perl Module.
  • Return: HTML and CSS
  • Access: public

Parameters:

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

[ Top ]

_createHTMLTag   [line 335]

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

create a Element of HTML part
  • Return: a Element of Tag HTML
  • Access: protected

Parameters:

array   $tag   — 
string   $type   —  css class of time line param
float   $fontSize   — 

[ Top ]


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