mirror of
https://github.com/standardebooks/web.git
synced 2025-07-19 12:54:48 -04:00
Completely type hint template functions and switch to named arguments
This commit is contained in:
parent
6108b5e53d
commit
124e8343fc
125 changed files with 542 additions and 450 deletions
|
@ -1,7 +1,13 @@
|
|||
<?
|
||||
/**
|
||||
* @property array<Ebook> $Entries
|
||||
*/
|
||||
class OpdsAcquisitionFeed extends OpdsFeed{
|
||||
public bool $IsCrawlable;
|
||||
|
||||
/**
|
||||
* @param array<Ebook> $entries
|
||||
*/
|
||||
public function __construct(string $title, string $subtitle, string $url, string $path, array $entries, ?OpdsNavigationFeed $parent, bool $isCrawlable = false){
|
||||
parent::__construct($title, $subtitle, $url, $path, $entries, $parent);
|
||||
$this->IsCrawlable = $isCrawlable;
|
||||
|
@ -13,6 +19,6 @@ class OpdsAcquisitionFeed extends OpdsFeed{
|
|||
// *******
|
||||
|
||||
protected function GetXmlString(): string{
|
||||
return $this->_XmlString ??= $this->CleanXmlString(Template::OpdsAcquisitionFeed(['id' => $this->Id, 'url' => $this->Url, 'title' => $this->Title, 'parentUrl' => $this->Parent ? $this->Parent->Url : null, 'updated' => $this->Updated, 'isCrawlable' => $this->IsCrawlable, 'subtitle' => $this->Subtitle, 'entries' => $this->Entries]));
|
||||
return $this->_XmlString ??= $this->CleanXmlString(Template::OpdsAcquisitionFeed(id: $this->Id, url: $this->Url, title: $this->Title, parentUrl: $this->Parent->Url ?? '', updated: $this->Updated, isCrawlable: $this->IsCrawlable, subtitle: $this->Subtitle, entries: $this->Entries));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue