mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Add PropertyFromHttp trait and update codebase to use new pattern
This commit is contained in:
parent
c35c47b793
commit
acb30b897c
47 changed files with 851 additions and 527 deletions
16
lib/Feed.php
16
lib/Feed.php
|
@ -14,8 +14,8 @@ abstract class Feed{
|
|||
public $Entries = [];
|
||||
public string $Path;
|
||||
public ?string $Stylesheet = null;
|
||||
protected ?string $XmlString = null;
|
||||
public ?DateTimeImmutable $Updated = null;
|
||||
protected string $_XmlString;
|
||||
public DateTimeImmutable $Updated;
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
|
@ -31,6 +31,13 @@ abstract class Feed{
|
|||
}
|
||||
|
||||
|
||||
// *******
|
||||
// GETTERS
|
||||
// *******
|
||||
|
||||
abstract protected function GetXmlString(): string;
|
||||
|
||||
|
||||
// *******
|
||||
// METHODS
|
||||
// *******
|
||||
|
@ -52,11 +59,6 @@ abstract class Feed{
|
|||
return $output;
|
||||
}
|
||||
|
||||
protected function GetXmlString(): string{
|
||||
// Virtual function, meant to be implemented by subclass
|
||||
return '';
|
||||
}
|
||||
|
||||
public function Save(): void{
|
||||
$feed = $this->GetXmlString();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue