Document a bit, start on file handler interface.

This commit is contained in:
Dave Smith-Hayes 2025-04-17 09:08:31 -04:00
parent 551d5043c1
commit bec39c3c8b
6 changed files with 39 additions and 7 deletions

View File

@ -1,7 +1,6 @@
<?php <?php
return return [
[
'paths' => [ 'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations', 'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds' 'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds'

View File

@ -8,7 +8,6 @@ if (form) {
const p2 = document.querySelector('input[name="checked_password"]'); const p2 = document.querySelector('input[name="checked_password"]');
if (p1.value == p2.value) { if (p1.value == p2.value) {
console.log("Passwords match");
form.submit(); form.submit();
} else { } else {
console.log("Passwords do not match"); console.log("Passwords do not match");

View File

@ -7,14 +7,22 @@ use Slovocast\Domain\Entity\Channel;
class ChannelAggregate implements ChannelAggregateInterface class ChannelAggregate implements ChannelAggregateInterface
{ {
protected Channel $channel;
/**
* @var array<Episode> $episodes
*/
protected array $episodes;
/** /**
* @param Channel $channel * @param Channel $channel
* @param array<Episode> $episodes * @param array<Episode> $episodes
*/ */
public function __construct( public function __construct(
protected Channel $channel, Channel $channel,
protected array $episodes array $episodes
) { ) {
$this->channel = $channel;
$this->setEpisodes($episodes); $this->setEpisodes($episodes);
} }

View File

@ -14,6 +14,10 @@ interface ChannelAggregateInterface
*/ */
public function getEpisodes(): array; public function getEpisodes(): array;
public function hasEpisodes(): bool; public function hasEpisodes(): bool;
/**
* Appends an episode to the existing list
*/
public function addEpisode(Episode $episode): void; public function addEpisode(Episode $episode): void;
/** /**

View File

@ -9,8 +9,9 @@ interface FeedGeneratorInterface
{ {
/** /**
* XMLNS Definitions that should be updated as new namespaces get added. * XMLNS Definitions that should be updated as new namespaces get added.
* This could probably be defines somewhere else if we need it. These are * This could probably be defined somewhere else if we need it. These are
* pulled from some old Podbean feeds. * pulled from some old Podbean feeds - so we should probably fine another
* source for the definitive list
*/ */
const XMLNS_CONTENT="http://purl.org/rss/1.0/modules/content/"; const XMLNS_CONTENT="http://purl.org/rss/1.0/modules/content/";
const XMLNS_WFW="http://wellformedweb.org/CommentAPI"; const XMLNS_WFW="http://wellformedweb.org/CommentAPI";

View File

@ -0,0 +1,21 @@
<?php
namespace Slovocast\Infrastructure\Api\File;
interface FileHandlerInterface
{
/**
* Persists a file in a specific location.
*/
public function save(string $path): bool;
/**
* Opens a file as a string buffer
*/
public function open(string $path): string;
/**
* Moves a file from one location to another
*/
public function move(string $source, string $destination): bool;
}