com.lokorin.dfcrafters.lib
[ class tree: com.lokorin.dfcrafters.lib ] [ index: com.lokorin.dfcrafters.lib ] [ all elements ]

Class: Counter

Source Location: /_includes/lib_counters.php

Class Overview

TableEntry
   |
   --Counter

Describes a counter which maintains a value that can be incremented by one.


Author(s):

  • Andreas Launila

Variables

Methods


Inherited Variables

Inherited Methods

Class: TableEntry

TableEntry::__construct()
Constructor for TableEntry.
TableEntry::getId()
Gets the unique identifier for the table entry.
TableEntry::readRow()
Processes the contents of a retrieved row that describes the entry.

Class Details

[line 44]
Describes a counter which maintains a value that can be incremented by one.



Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$description =

[line 59]

The description of what the counter records.



Tags:

access:  private

Type:   string


[ Top ]

$hits =

[line 49]

The number of hits that the counter has recorded.



Tags:

access:  private

Type:   integer


[ Top ]

$lastTimestamp =

[line 54]

The unix timestamp of the last hit that the counter recorded.



Tags:

access:  private

Type:   integer


[ Top ]



Class Methods


constructor __construct [line 66]

Counter __construct( [integer $id = 0])

Constructor for Counter.



Tags:

access:  public


Overrides TableEntry::__construct() (Constructor for TableEntry.)

Parameters:

integer   $id   The unique identifier for the counter. This parameter is optional, if it's not given then a new counter is created.

[ Top ]

method getDescription [line 146]

string getDescription( )

Gets the counter's description. The description describes what the counter is recording.



Tags:

return:  A description.
access:  public


[ Top ]

method readRow [line 93]

void readRow( mixed $row)



Tags:

access:  protected
see:  com.lokorin.dfcrafters.TableEntry.readRow($row)


Overrides TableEntry::readRow() (Processes the contents of a retrieved row that describes the entry.)

[ Top ]

method recordHit [line 103]

void recordHit( )

Records that a hit has occured. Increments the counter.



Tags:

access:  public


[ Top ]

method save [line 114]

void save( )

Saves the current information held by the counter. This public function should be concidered private.



Tags:

access:  public


[ Top ]

method setDescription [line 135]

void setDescription( string $newDescription)

Sets the counters description to a new value.



Tags:

access:  public


Parameters:

string   $newDescription   The new description that should be used for the counter. This description should describe what the counter records.

[ Top ]


Documentation generated on Tue, 10 Jan 2006 17:06:25 +0100 by phpDocumentor 1.3.0RC4