modules/Trackers/monitor/Monitor.php
Constants
\Monitor
- Parent(s)
- \Trackable
- Children
- \tracker_monitor
- \BlankMonitor
- \tracker_queries_monitor
Properties
Methods

Monitor(
$name
=
'', $monitorId
=
'', $metadata
=
'', $store
=
''
)
:
voidMonitor constructor
| Name | Type | Description |
|---|---|---|
| $name | ||
| $monitorId | ||
| $metadata | ||
| $store |

getMetrics(
)
:
ArraygetMetrics Returns Array of metric instances defined for monitor instance
| Type | Description |
|---|---|
| Array | of metric instances defined for monitor instance |

getStore(
\$store $store
)
:
\AngetStore 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.
| Name | Type | Description |
|---|---|---|
| $store | \$store | The name of the store as defined in the 'modules/Trackers/config.php' settings |
| Type | Description |
|---|---|
| \An | instance of a Store implementation |
| Exception | Description |
|---|---|
| \Exception | Thrown if $store class cannot be loaded |

getStores(
)
:
ArraygetStores Returns Array of store names defined for monitor instance
| Type | Description |
|---|---|
| Array | of store names defined for monitor instance |

isDirty(
)
:
\$dirtyisDirty Returns if the monitor has data that needs to be saved
| Type | Description |
|---|---|
| \$dirty | boolean |

save(
\$flush $flush
=
true
)
:
voidsave This method retrieves the Store instances associated with monitor and calls the flush method passing with the montior ($this) instance.
| Name | Type | Description |
|---|---|---|
| $flush | \$flush | boolean parameter indicating whether or not to flush the instance data to store or possibly cache |

setValue(
\$name $name, \$value $value
)
:
voidsetValue Sets the value defined in the monitor's metrics for the given name
| Name | Type | Description |
|---|---|---|
| $name | \$name | String value of metric name |
| $value | \$value | Mixed value |
| Exception | Description |
|---|---|
| \Exception | Thrown if metric name is not configured for monitor instance |