From 0cecf9cc72ad1a171e7d5794dfee6d2917be6274 Mon Sep 17 00:00:00 2001 From: Joby Elliott Date: Thu, 1 Dec 2022 17:25:35 -0700 Subject: [PATCH] metadata, sectioning, and header content tags --- src/ContentCategories/FlowContent.php | 7 + src/ContentCategories/HeadingContent.php | 7 + src/ContentCategories/MetadataContent.php | 7 + src/ContentCategories/PhrasingContent.php | 7 + src/ContentCategories/SectioningContent.php | 7 + src/Html5/AbstractTags/AbstractHeaderTag.php | 10 ++ src/Html5/Tags/ArticleTag.php | 12 ++ src/Html5/Tags/AsideTag.php | 12 ++ src/Html5/Tags/BaseTag.php | 3 +- src/Html5/Tags/H1Tag.php | 10 ++ src/Html5/Tags/H2Tag.php | 10 ++ src/Html5/Tags/H3Tag.php | 10 ++ src/Html5/Tags/H4Tag.php | 10 ++ src/Html5/Tags/H5Tag.php | 10 ++ src/Html5/Tags/H6Tag.php | 10 ++ src/Html5/Tags/HgroupTag.php | 12 ++ src/Html5/Tags/LinkTag.php | 3 +- src/Html5/Tags/MetaTag.php | 3 +- src/Html5/Tags/NavTag.php | 12 ++ src/Html5/Tags/NoscriptTag.php | 13 ++ src/Html5/Tags/ScriptTag.php | 156 +++++++++++++++++++ src/Html5/Tags/SectionTag.php | 12 ++ src/Html5/Tags/StyleTag.php | 3 +- 23 files changed, 342 insertions(+), 4 deletions(-) create mode 100644 src/ContentCategories/FlowContent.php create mode 100644 src/ContentCategories/HeadingContent.php create mode 100644 src/ContentCategories/MetadataContent.php create mode 100644 src/ContentCategories/PhrasingContent.php create mode 100644 src/ContentCategories/SectioningContent.php create mode 100644 src/Html5/AbstractTags/AbstractHeaderTag.php create mode 100644 src/Html5/Tags/ArticleTag.php create mode 100644 src/Html5/Tags/AsideTag.php create mode 100644 src/Html5/Tags/H1Tag.php create mode 100644 src/Html5/Tags/H2Tag.php create mode 100644 src/Html5/Tags/H3Tag.php create mode 100644 src/Html5/Tags/H4Tag.php create mode 100644 src/Html5/Tags/H5Tag.php create mode 100644 src/Html5/Tags/H6Tag.php create mode 100644 src/Html5/Tags/HgroupTag.php create mode 100644 src/Html5/Tags/NavTag.php create mode 100644 src/Html5/Tags/NoscriptTag.php create mode 100644 src/Html5/Tags/ScriptTag.php create mode 100644 src/Html5/Tags/SectionTag.php diff --git a/src/ContentCategories/FlowContent.php b/src/ContentCategories/FlowContent.php new file mode 100644 index 0000000..0316fa3 --- /dev/null +++ b/src/ContentCategories/FlowContent.php @@ -0,0 +1,7 @@ +attributes()['async'] = null; + else unset($this->attributes()['async']); + return $this; + } + + public function async(): bool + { + return isset($this->attributes()['async']); + } + + public function setDefer(bool $defer): static + { + if ($defer) $this->attributes()['defer'] = null; + else unset($this->attributes()['defer']); + return $this; + } + + public function defer(): bool + { + return isset($this->attributes()['defer']); + } + + public function crossorigin(): null|string + { + return $this->attributes()['crossorigin']; + } + + public function setCrossorigin(null|string $crossorigin): static + { + $this->attributes()['crossorigin'] = $crossorigin; + return $this; + } + + public function unsetCrossorigin(): static + { + unset($this->attributes()['crossorigin']); + return $this; + } + + public function integrity(): null|string + { + return $this->attributes()['integrity']; + } + + public function setIntegrity(null|string $integrity): static + { + $this->attributes()['integrity'] = $integrity; + return $this; + } + + public function unsetIntegrity(): static + { + unset($this->attributes()['integrity']); + return $this; + } + + public function nomodule(): null|string + { + return $this->attributes()['nomodule']; + } + + public function setNomodule(null|string $nomodule): static + { + $this->attributes()['nomodule'] = $nomodule; + return $this; + } + + public function unsetNomodule(): static + { + unset($this->attributes()['nomodule']); + return $this; + } + + public function nonce(): null|string + { + return $this->attributes()['nonce']; + } + + public function setNonce(null|string $nonce): static + { + $this->attributes()['nonce'] = $nonce; + return $this; + } + + public function unsetNonce(): static + { + unset($this->attributes()['nonce']); + return $this; + } + + public function referrerpolicy(): null|string + { + return $this->attributes()['referrerpolicy']; + } + + public function setReferrerpolicy(null|string $referrerpolicy): static + { + $this->attributes()['referrerpolicy'] = $referrerpolicy; + return $this; + } + + public function unsetReferrerpolicy(): static + { + unset($this->attributes()['referrerpolicy']); + return $this; + } + + public function src(): null|string + { + return $this->attributes()['src']; + } + + public function setSrc(null|string $src): static + { + $this->attributes()['src'] = $src; + return $this; + } + + public function unsetSrc(): static + { + unset($this->attributes()['src']); + return $this; + } + + public function type(): null|string + { + return $this->attributes()['type']; + } + + public function setType(null|string $type): static + { + $this->attributes()['type'] = $type; + return $this; + } + + public function unsetType(): static + { + unset($this->attributes()['type']); + return $this; + } +} diff --git a/src/Html5/Tags/SectionTag.php b/src/Html5/Tags/SectionTag.php new file mode 100644 index 0000000..f8add90 --- /dev/null +++ b/src/Html5/Tags/SectionTag.php @@ -0,0 +1,12 @@ +