Pletacka website Nette documentation
Documentation for pletacka project
Public Member Functions | Public Attributes | List of all members
App\TimeManagers\TimeBox Class Reference

The main time counting class. More...

Public Member Functions

 __construct ($tableSelection, $previousEvent, DateTime $startTime, DateTime $endTime)
 Constructor. More...
 
 getEvents ()
 Get events. More...
 
 countEvents ($state=NULL)
 Count of table rows of specific Pletacka state or all states (null) More...
 
 allTime ()
 Get all pletacka time. More...
 
 stopTime ()
 Get stop time. More...
 
 lastStopTime (DateTime $now)
 Get last stop time. More...
 
 workTime (int $allTime, int $stopTime)
 Get work time. More...
 

Public Attributes

const FINISHED = 'FINISHED'
 
const STOP = "STOP"
 
const REWORK = "REWORK"
 
const ON = 'ON'
 
const OFF = 'OFF'
 

Detailed Description

The main time counting class.

Input database selection

Constructor & Destructor Documentation

◆ __construct()

App\TimeManagers\TimeBox::__construct (   $tableSelection,
  $previousEvent,
DateTime  $startTime,
DateTime  $endTime 
)

Constructor.

Parameters
$tableSelection
$previousEvent
DateTime$startTime
DateTime$endTime

Member Function Documentation

◆ allTime()

App\TimeManagers\TimeBox::allTime ( )

Get all pletacka time.

Returns
int time in seconds

◆ countEvents()

App\TimeManagers\TimeBox::countEvents (   $state = NULL)

Count of table rows of specific Pletacka state or all states (null)

Parameters
null$statePletacka state or all states (null)
Returns
int count

◆ getEvents()

App\TimeManagers\TimeBox::getEvents ( )

Get events.

Returns
Selection

◆ lastStopTime()

App\TimeManagers\TimeBox::lastStopTime ( DateTime  $now)

Get last stop time.

Parameters
DateTime$now
Returns
int time in seconds

◆ stopTime()

App\TimeManagers\TimeBox::stopTime ( )

Get stop time.

Returns
int time in seconds

◆ workTime()

App\TimeManagers\TimeBox::workTime ( int  $allTime,
int  $stopTime 
)

Get work time.

Parameters
int$allTime
int$stopTime
Returns
int time in second

Member Data Documentation

◆ FINISHED

const App\TimeManagers\TimeBox::FINISHED = 'FINISHED'

◆ OFF

const App\TimeManagers\TimeBox::OFF = 'OFF'

◆ ON

const App\TimeManagers\TimeBox::ON = 'ON'

◆ REWORK

const App\TimeManagers\TimeBox::REWORK = "REWORK"

◆ STOP

const App\TimeManagers\TimeBox::STOP = "STOP"

The documentation for this class was generated from the following file: