Spork Code Libraries

ReportLogTable

Extends
\Zend\EventManager\AbstractListenerAggregate
Implements
\SporkTools\Core\Job\Feature\FeatureInterface

Properties

$columnMap

$columnMap : 

Type

$db

$db : \Zend\Db\Adapter\Adapter

Type

\Zend\Db\Adapter\Adapter — | string

$table

$table : string

Type

string

$typeMap

$typeMap : 

Type

Methods

__construct()

__construct(  $options = null) 

Parameters

$options

attach()

attach(\Zend\EventManager\EventManagerInterface  $events) 

Parameters

\Zend\EventManager\EventManagerInterface $events

hasFeature()

hasFeature(\SporkTools\Core\Job\Event  $event) : boolean

Handles job manager's has feature event. Indicates get report feature is available.

Parameters

\SporkTools\Core\Job\Event $event

Returns

boolean

setDb()

setDb(  $db) 

Sets the database adapter or the name of the adapter available from the service manager.

Parameters

$db

setColumnMap()

setColumnMap(array  $map) 

Parameters

array $map

setTable()

setTable(string  $table) 

Sets the log's table name

Parameters

string $table

initialize()

initialize(\Zend\ServiceManager\ServiceLocatorInterface  $serviceManager) 

Setup properties required to query database

Parameters

\Zend\ServiceManager\ServiceLocatorInterface $serviceManager

Throws

\Exception

on resources not available

fetchLastBatchId()

fetchLastBatchId(\SporkTools\Core\Job\Feature\SporkTools\Core\Job\AbstractJob  $job) : boolean|string

Queries the log table to find batch id for the job's last execution.

Note: This function expects the log entries to be formated by the OutputLog feature class.

Parameters

\SporkTools\Core\Job\Feature\SporkTools\Core\Job\AbstractJob $job

Returns

boolean|string