modules/Trackers/monitor/Monitor.php

Show: inherited
Table of Contents

Constants

Constant  MAX_SESSION_LENGTH = 36

\Monitor

Package:
Parent(s)
\Trackable
Children
\tracker_monitor
\BlankMonitor

Properties

Propertypublic  $active= ''
Details
Type
n/a
Propertyprotected  $cachedStores= ''
Details
Type
n/a
Propertypublic  $date_end= ''
Details
Type
n/a
Propertypublic  $date_start= ''
Details
Type
n/a
Propertyprotected  $dirty= 'false'
Default valuefalseDetails
Type
n/a
Propertyprotected  $enabled= 'true'
Default valuetrueDetails
Type
n/a
Propertyprotected  $metrics= ''
Details
Type
n/a
Propertypublic  $metricsFile= ''
Details
Type
n/a
Propertypublic  $monitor_id= ''
Details
Type
n/a
Propertypublic  $name= ''
Details
Type
n/a
Propertypublic  $round_trips= ''
Details
Type
n/a
Propertypublic  $seconds= ''
Details
Type
n/a
Propertypublic  $session_id= ''
Details
Type
n/a
Propertypublic  $stores= ''
Details
Type
n/a
Propertypublic  $table_name= ''
Details
Type
n/a

Methods

methodpublicMonitor(  $name = '',  $monitorId = '',  $metadata = '',  $store = '' ) : void

Monitor constructor

Parameters
Name Type Description
$name
$monitorId
$metadata
$store
methodpublicclear( ) : void

clear This function clears the metrics data in the monitor instance

methodpublicgetMetrics( ) : Array

getMetrics Returns Array of metric instances defined for monitor instance

Returns
Type Description
Array of metric instances defined for monitor instance
methodpublicgetSessionId( ) : void

methodprotectedgetStore( \$store $store ) : \An

getStore This method checks if the Store implementation has already been instantiated and will return the one stored; otherwise it will create the Store implementation and save it to the Array of Stores.

Parameters
Name Type Description
$store \$store

The name of the store as defined in the 'modules/Trackers/config.php' settings

Returns
Type Description
\An instance of a Store implementation
Throws
Exception Description
\Exception Thrown if $store class cannot be loaded
methodpublicgetStores( ) : Array

getStores Returns Array of store names defined for monitor instance

Returns
Type Description
Array of store names defined for monitor instance
methodpublicgetValue(  $name ) : void

Parameters
Name Type Description
$name
methodpublicisDirty( ) : \$dirty

isDirty Returns if the monitor has data that needs to be saved

Returns
Type Description
\$dirty boolean
methodpublicisEnabled( ) : void

methodpublicsave( \$flush $flush = true ) : void

save This method retrieves the Store instances associated with monitor and calls the flush method passing with the montior ($this) instance.

Parameters
Name Type Description
$flush \$flush

boolean parameter indicating whether or not to flush the instance data to store or possibly cache

methodpublicsetEnabled(  $enable = true ) : void

Parameters
Name Type Description
$enable
methodpublicsetValue( \$name $name, \$value $value ) : void

setValue Sets the value defined in the monitor's metrics for the given name

Parameters
Name Type Description
$name \$name

String value of metric name

$value \$value

Mixed value

Throws
Exception Description
\Exception Thrown if metric name is not configured for monitor instance
methodpublictoArray( ) : \An

Returns the monitor's metrics/values as an Array

Returns
Type Description
\An Array of data for the monitor's corresponding metrics
Documentation was generated by DocBlox 0.18.1.