Search
extends Shift
in package
Shifts Search class
Table of Contents
Constants
- ERR_EMPTY_ARRAY = -2
- ERR_EMPTY_RESULT = -1
- ERR_INVALID_DATA = -3
- OK_UPDATE = 1
Properties
- $authUrl : string
- $data : array<string|int, mixed>
- $searchUrl : string
- $history : bool
- $idGroups : array<string|int, mixed>
- $idShifters : array<string|int, mixed>
- $idTypeShifts : array<string|int, mixed>
- $startDate : Datetime
- $stopDate : Datetime
- $swapsAddedInLate : bool
Methods
- __construct() : mixed
- __destruct() : mixed
- addFilterByHistory() : void
- Add filters on historical data (search swap shifts changes)
- addFilterByIdGroups() : void
- Add filters by internal idGroup (division) Calling this method you can add several ID to search.
- addFilterByIdShifters() : void
- Add filters by Shifter Zucchetti ID.
- addFilterByIdTypeShifts() : void
- Add filters by TypeShifts Zucchetti ID .
- addFilterByStartDate() : void
- Add filters by start date
- addFilterByStopDate() : void
- Add filters by stop date
- addFilterSwapShiftsAddedInLate() : void
- Add filters by swap shifts added in late
- fetch() : int
- Connect to CollettoreUnico and do searchs
- getIterator() : array<string|int, mixed>
- Iterate over shifts found
- setFilters() : string
- Set filters to select needed data
Constants
ERR_EMPTY_ARRAY
public
mixed
ERR_EMPTY_ARRAY
= -2
ERR_EMPTY_RESULT
public
mixed
ERR_EMPTY_RESULT
= -1
ERR_INVALID_DATA
public
mixed
ERR_INVALID_DATA
= -3
OK_UPDATE
public
mixed
OK_UPDATE
= 1
Properties
$authUrl
protected
string
$authUrl
= ''
$data
protected
array<string|int, mixed>
$data
$searchUrl
protected
string
$searchUrl
= ''
$history
private
bool
$history
= false
$idGroups
private
array<string|int, mixed>
$idGroups
= array()
$idShifters
private
array<string|int, mixed>
$idShifters
= array()
$idTypeShifts
private
array<string|int, mixed>
$idTypeShifts
= array()
$startDate
private
Datetime
$startDate
$stopDate
private
Datetime
$stopDate
$swapsAddedInLate
private
bool
$swapsAddedInLate
= false
Methods
__construct()
public
__construct(string $proto, string $fqdn, int $port, string $auth) : mixed
Parameters
- $proto : string
- $fqdn : string
- $port : int
- $auth : string
__destruct()
public
__destruct() : mixed
addFilterByHistory()
Add filters on historical data (search swap shifts changes)
public
addFilterByHistory(bool $history) : void
Parameters
- $history : bool
addFilterByIdGroups()
Add filters by internal idGroup (division) Calling this method you can add several ID to search.
public
addFilterByIdGroups(int $idGroup) : void
Parameters
- $idGroup : int
addFilterByIdShifters()
Add filters by Shifter Zucchetti ID.
public
addFilterByIdShifters(string $idShifter) : void
Calling this method you can add several ID to search.
Parameters
- $idShifter : string
addFilterByIdTypeShifts()
Add filters by TypeShifts Zucchetti ID .
public
addFilterByIdTypeShifts(int $idTypeShifts) : void
Calling this method you can add several ID to search.
Parameters
- $idTypeShifts : int
addFilterByStartDate()
Add filters by start date
public
addFilterByStartDate(Datetime $startDate) : void
Parameters
- $startDate : Datetime
addFilterByStopDate()
Add filters by stop date
public
addFilterByStopDate(Datetime $stopDate) : void
Parameters
- $stopDate : Datetime
addFilterSwapShiftsAddedInLate()
Add filters by swap shifts added in late
public
addFilterSwapShiftsAddedInLate() : void
fetch()
Connect to CollettoreUnico and do searchs
public
fetch() : int
Return values
int —Number of elems found
getIterator()
Iterate over shifts found
public
getIterator() : array<string|int, mixed>
Return values
array<string|int, mixed> —found Data
setFilters()
Set filters to select needed data
private
setFilters() : string
Return values
string —json encoded filters