SunnyCashExpirationStrategy
in package
implements
SunnyCashExpirationStrategyInterface
Class SunnyCashExpirationStrategy
Interfaces, Classes and Traits
- SunnyCashExpirationStrategyInterface
- Interface SunnyCashExpirationStrategyInterface
Table of Contents
- $daytimeEnd : int
- $daytimeStart : int
- $interval : int
- $offsetMinutesForNewDay : int
- isExpired() : bool
- Indicates if something is expired according to the strategy and the given date and time.
- isDaytime() : bool
- Indicates if it is daytime.
- isOlderThanInterval() : bool
- Indicates if the file is older than the specified interval.
- isOlderThanToday() : bool
- Indicates if the file is older than today plus a specified offset of this day.
- minuteOfDay() : int
- Calculates the number of minutes for a given number of hours and minutes.
Properties
$daytimeEnd
protected
int
$daytimeEnd
= 19
$daytimeStart
protected
int
$daytimeStart
= 8
$interval
protected
int
$interval
= 120
$offsetMinutesForNewDay
protected
int
$offsetMinutesForNewDay
= 15
Methods
isExpired()
Indicates if something is expired according to the strategy and the given date and time.
public
isExpired(IntType $timestamp) : bool
Parameters
- $timestamp : IntType
-
The timestamp that is tested
Return values
bool —isDaytime()
Indicates if it is daytime.
protected
isDaytime() : bool
Return values
bool —isOlderThanInterval()
Indicates if the file is older than the specified interval.
protected
isOlderThanInterval(IntType $timestamp) : bool
Parameters
- $timestamp : IntType
Return values
bool —isOlderThanToday()
Indicates if the file is older than today plus a specified offset of this day.
protected
isOlderThanToday(IntType $timestamp) : bool
Parameters
- $timestamp : IntType
Return values
bool —minuteOfDay()
Calculates the number of minutes for a given number of hours and minutes.
protected
minuteOfDay(IntType $hours, IntType $minutes) : int