1. Go to this page and download the library: Download zrnik/enum library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
if($this->Stardate->DayOfWeek === DayOfWeek::Monday)
{
$this->spaceTime = new SpaceTime();
//TODO: Decide if light will be particle or wave
$this->spaceTime->addComponent(new Light());
}
foreach(DayOfWeek::getValues() as $value)
{
echo 'It\'s '.DayOfWeek::getName($value).' and im still lazy. '.PHP_EOL;
}
foreach(DayOfWeek::getNames() as $name)
{
echo 'It\'s '.$name.' and im'.(DayOfWeek::getValue($name) === DayOfWeek::Monday ? ' ':' still ').'lazy. '.PHP_EOL;
}
if(DayOfWeek::getValue("Monday") === DayOfWeek::Monday) {
// true
}
if(DayOfWeek::getValue("monday") === DayOfWeek::Monday) {
// Invalid Argument Exception
}
if(DayOfWeek::getValue("monday", false) === DayOfWeek::Monday) {
// true, case sensitivity disabled
}
if(DayOfWeek::getValue("monday ", false) === DayOfWeek::Monday) {
// true, not case sensitive AND it gets trimmed automatically
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.