From 1ce3f5fd17cdc6f001b75a36751c001beea77312 Mon Sep 17 00:00:00 2001 From: Yusuf Kandemir Date: Fri, 14 Dec 2018 10:05:33 +0300 Subject: [PATCH] Added references to W3C Specification in docblocks This is much better for understanding whats going on. Also as the reference links are pointing to 26/04/2018 version, it helps understanding if things have been changed etc. --- src/MicrodataDOMDocument.php | 2 ++ src/MicrodataDOMElement.php | 8 ++++++++ src/MicrodataParser.php | 2 ++ 3 files changed, 12 insertions(+) diff --git a/src/MicrodataDOMDocument.php b/src/MicrodataDOMDocument.php index e9d6b35..bf3c47d 100644 --- a/src/MicrodataDOMDocument.php +++ b/src/MicrodataDOMDocument.php @@ -10,6 +10,8 @@ class MicrodataDOMDocument extends \DOMDocument /** * Get top-level items of the document * + * @see https://www.w3.org/TR/2018/WD-microdata-20180426/#dfn-top-level-microdata-item + * * @return \DOMNodeList List of top level items as elements */ public function getItems() : \DOMNodeList diff --git a/src/MicrodataDOMElement.php b/src/MicrodataDOMElement.php index ed61c34..6ea8035 100644 --- a/src/MicrodataDOMElement.php +++ b/src/MicrodataDOMElement.php @@ -5,6 +5,8 @@ namespace YusufKandemir\MicrodataParser; class MicrodataDOMElement extends \DOMElement { /** + * @see https://www.w3.org/TR/2018/WD-microdata-20180426/#dfn-item-properties for details of algorithm + * * @return array */ public function getProperties() : array @@ -57,6 +59,8 @@ class MicrodataDOMElement extends \DOMElement } /** + * @see https://www.w3.org/TR/2018/WD-microdata-20180426/#dfn-property-name + * * @return array */ public function getPropertyNames() : array @@ -77,6 +81,8 @@ class MicrodataDOMElement extends \DOMElement } /** + * @see https://www.w3.org/TR/2018/WD-microdata-20180426/#dfn-property-value for details of algorithm + * * @return $this|string */ public function getPropertyValue() @@ -194,6 +200,8 @@ class MicrodataDOMElement extends \DOMElement * * @see \preg_split() for possible return values and behaviour * + * @see https://www.w3.org/TR/2018/WD-microdata-20180426/#dfn-split-a-string-on-spaces for definition of tokens + * * @param string $attribute * * @return array[]|false|string[] diff --git a/src/MicrodataParser.php b/src/MicrodataParser.php index aa534cc..3d3dc03 100644 --- a/src/MicrodataParser.php +++ b/src/MicrodataParser.php @@ -73,6 +73,8 @@ class MicrodataParser } /** + * @see https://www.w3.org/TR/2018/WD-microdata-20180426/#dfn-get-the-object + * * @param MicrodataDOMElement $item * @param array $memory *