Table of Contents
Constants
-
CSS_CLASSES
= ['New Moon' => 'moon-new', 'Waxing Crescent' => 'moon-waxing-crescent-3', 'First Quarter' => 'moon-first-quarter', 'Waxing Gibbous' => 'moon-waxing-gibbous-3', 'Full Moon' => 'moon-full', 'Waning Gibbous' => 'moon-waning-gibbous-3', 'Third Quarter' => 'moon-third-quarter', 'Waning Crescent' => 'moon-waning-crescent-3']
-
PHASES
= ['New Moon' => 0, 'Waxing Crescent' => 1, 'First Quarter' => 2, 'Waxing Gibbous' => 3, 'Full Moon' => 4, 'Waning Gibbous' => 5, 'Third Quarter' => 6, 'Waning Crescent' => 7]
Properties
-
$moonPhase
: MoonPhase
Methods
-
__construct()
: mixed
-
displayPhase()
: string
-
generatePhaseDisplay()
: string
-
getPhaseCss()
: string
-
getPhaseInt()
: int
CSS_CLASSES
private
mixed
CSS_CLASSES
= ['New Moon' => 'moon-new', 'Waxing Crescent' => 'moon-waxing-crescent-3', 'First Quarter' => 'moon-first-quarter', 'Waxing Gibbous' => 'moon-waxing-gibbous-3', 'Full Moon' => 'moon-full', 'Waning Gibbous' => 'moon-waning-gibbous-3', 'Third Quarter' => 'moon-third-quarter', 'Waning Crescent' => 'moon-waning-crescent-3']
PHASES
private
mixed
PHASES
= ['New Moon' => 0, 'Waxing Crescent' => 1, 'First Quarter' => 2, 'Waxing Gibbous' => 3, 'Full Moon' => 4, 'Waning Gibbous' => 5, 'Third Quarter' => 6, 'Waning Crescent' => 7]
$moonPhase
private
MoonPhase
$moonPhase
__construct()
public
__construct() : mixed
displayPhase()
public
displayPhase() : string
-
throws
-
Exception
generatePhaseDisplay()
private
generatePhaseDisplay(string $icon, int $phase) : string
Parameters
-
$icon
: string
-
-
$phase
: int
-
-
throws
-
Exception
getPhaseCss()
private
getPhaseCss(string $phaseName) : string
Parameters
-
$phaseName
: string
-
getPhaseInt()
private
getPhaseInt(string $phaseName) : int
Parameters
-
$phaseName
: string
-