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.
This commit is contained in:
Yusuf Kandemir 2018-12-14 10:05:33 +03:00
parent 9eaf3cbcfa
commit 1ce3f5fd17
3 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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[]

View File

@ -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
*