-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,018 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* @link https://github.com/nicoSWD | ||
* @author Nicolas Oelgart <[email protected]> | ||
*/ | ||
namespace nicoSWD\IfscCalendar\Domain\Event; | ||
namespace nicoSWD\IfscCalendar\Domain\Event\Exceptions; | ||
|
||
use Exception; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* @license http://opensource.org/licenses/mit-license.php MIT | ||
* @link https://github.com/nicoSWD | ||
* @author Nicolas Oelgart <[email protected]> | ||
*/ | ||
namespace nicoSWD\IfscCalendar\Domain\Event\Exceptions; | ||
|
||
use Exception; | ||
|
||
final class InvalidURLException extends Exception | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* @license http://opensource.org/licenses/mit-license.php MIT | ||
* @link https://github.com/nicoSWD | ||
* @author Nicolas Oelgart <[email protected]> | ||
*/ | ||
namespace nicoSWD\IfscCalendar\Domain\Event; | ||
|
||
use DateTimeImmutable; | ||
|
||
final readonly class IFSCEventFactory | ||
{ | ||
public function __construct( | ||
private string $siteUrl, | ||
) { | ||
} | ||
|
||
public function create( | ||
string $name, | ||
int $id, | ||
string $description, | ||
string $streamUrl, | ||
string $poster, | ||
DateTimeImmutable $startTime, | ||
DateTimeImmutable $endTime, | ||
): IFSCEvent { | ||
return new IFSCEvent( | ||
name: $name, | ||
id: $id, | ||
description: $description, | ||
streamUrl: $streamUrl, | ||
siteUrl: sprintf($this->siteUrl, $startTime->format('Y'), $id), | ||
poster: $poster, | ||
startTime: $startTime, | ||
endTime: $endTime, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.