diff --git a/docs/markdown/index.md b/docs/markdown/index.md index ca13407..1ef195c 100644 --- a/docs/markdown/index.md +++ b/docs/markdown/index.md @@ -2,10 +2,16 @@ ### [IvoPetkov\HTML5DOMDocument](ivopetkov.html5domdocument.class.md) +      Represents a live (can be manipulated) representation of a HTML5 document. + ### [IvoPetkov\HTML5DOMElement](ivopetkov.html5domelement.class.md) +      Represents a live (can be manipulated) representation of an element in a HTML5 document. + ### [IvoPetkov\HTML5DOMNodeList](ivopetkov.html5domnodelist.class.md) +      Represents a list of DOM nodes. + ### [IvoPetkov\HTML5DOMTokenList](ivopetkov.html5domtokenlist.class.md)       Represents a set of space-separated tokens of an element attribute. diff --git a/docs/markdown/ivopetkov.html5domdocument.__construct.method.md b/docs/markdown/ivopetkov.html5domdocument.__construct.method.md index c2865b6..86dfdbb 100644 --- a/docs/markdown/ivopetkov.html5domdocument.__construct.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.__construct.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::__construct -Creates a new \IvoPetkov\HTML5DOMDocument object +Creates a new HTML5DOMDocument object. ```php public __construct ( [ string $version ] [, string $encoding ] ) diff --git a/docs/markdown/ivopetkov.html5domdocument.class.md b/docs/markdown/ivopetkov.html5domdocument.class.md index 4d2ea5c..3cdd98b 100644 --- a/docs/markdown/ivopetkov.html5domdocument.class.md +++ b/docs/markdown/ivopetkov.html5domdocument.class.md @@ -2,15 +2,17 @@ extends [DOMDocument](http://php.net/manual/en/class.domdocument.php) +Represents a live (can be manipulated) representation of a HTML5 document. + ## Methods ##### public [__construct](ivopetkov.html5domdocument.__construct.method.md) ( [ string $version ] [, string $encoding ] ) -      Creates a new \IvoPetkov\HTML5DOMDocument object +      Creates a new HTML5DOMDocument object. ##### public [DOMElement](http://php.net/manual/en/class.domelement.php) [createInsertTarget](ivopetkov.html5domdocument.createinserttarget.method.md) ( string $name ) -      Creates an element that will be replaced by the new body in insertHTML +      Creates an element that will be replaced by the new body in insertHTML. ##### public void [insertHTML](ivopetkov.html5domdocument.inserthtml.method.md) ( string $source [, string $target = 'beforeBodyEnd' ] ) @@ -22,27 +24,27 @@ extends [DOMDocument](http://php.net/manual/en/class.domdocument.php) ##### public boolean [loadHTML](ivopetkov.html5domdocument.loadhtml.method.md) ( string $source [, int $options = 0 ] ) -      Load HTML from a string +      Load HTML from a string. ##### public void [loadHTMLFile](ivopetkov.html5domdocument.loadhtmlfile.method.md) ( string $filename [, int $options = 0 ] ) -      Load HTML from a file +      Load HTML from a file. ##### public [DOMElement](http://php.net/manual/en/class.domelement.php)|null [querySelector](ivopetkov.html5domdocument.queryselector.method.md) ( string $selector ) -      Returns the first document element matching the selector +      Returns the first document element matching the selector. ##### public [DOMNodeList](http://php.net/manual/en/class.domnodelist.php) [querySelectorAll](ivopetkov.html5domdocument.queryselectorall.method.md) ( string $selector ) -      Returns a list of document elements matching the selector +      Returns a list of document elements matching the selector. ##### public string [saveHTML](ivopetkov.html5domdocument.savehtml.method.md) ( [ [DOMNode](http://php.net/manual/en/class.domnode.php) $node ] ) -      Dumps the internal document into a string using HTML formatting +      Dumps the internal document into a string using HTML formatting. ##### public int [saveHTMLFile](ivopetkov.html5domdocument.savehtmlfile.method.md) ( string $filename ) -      Dumps the internal document into a file using HTML formatting +      Dumps the internal document into a file using HTML formatting. ### Inherited from DOMNode: diff --git a/docs/markdown/ivopetkov.html5domdocument.createinserttarget.method.md b/docs/markdown/ivopetkov.html5domdocument.createinserttarget.method.md index 1ea6131..ee21577 100644 --- a/docs/markdown/ivopetkov.html5domdocument.createinserttarget.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.createinserttarget.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::createInsertTarget -Creates an element that will be replaced by the new body in insertHTML +Creates an element that will be replaced by the new body in insertHTML. ```php public DOMElement createInsertTarget ( string $name ) @@ -10,11 +10,11 @@ public DOMElement createInsertTarget ( string $name )       `$name` -            The name of the insert target +            The name of the insert target. ## Returns -      A new DOMElement that must be set in the place where the new body will be inserted +      A new DOMElement that must be set in the place where the new body will be inserted. ## Details diff --git a/docs/markdown/ivopetkov.html5domdocument.inserthtml.method.md b/docs/markdown/ivopetkov.html5domdocument.inserthtml.method.md index 683e97c..e9ca28a 100644 --- a/docs/markdown/ivopetkov.html5domdocument.inserthtml.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.inserthtml.method.md @@ -10,7 +10,7 @@ public void insertHTML ( string $source [, string $target = 'beforeBodyEnd' ] )       `$source` -            The HTML code to be inserted +            The HTML code to be inserted.       `$target` diff --git a/docs/markdown/ivopetkov.html5domdocument.loadhtml.method.md b/docs/markdown/ivopetkov.html5domdocument.loadhtml.method.md index 5791e46..4178c80 100644 --- a/docs/markdown/ivopetkov.html5domdocument.loadhtml.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.loadhtml.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::loadHTML -Load HTML from a string +Load HTML from a string. ```php public boolean loadHTML ( string $source [, int $options = 0 ] ) @@ -10,15 +10,15 @@ public boolean loadHTML ( string $source [, int $options = 0 ] )       `$source` -            The HTML code +            The HTML code.       `$options` -            Additional Libxml parameters +            Additional Libxml parameters. ## Returns -      TRUE on success or FALSE on failure +      TRUE on success or FALSE on failure. ## Details diff --git a/docs/markdown/ivopetkov.html5domdocument.loadhtmlfile.method.md b/docs/markdown/ivopetkov.html5domdocument.loadhtmlfile.method.md index dab609b..136aa2c 100644 --- a/docs/markdown/ivopetkov.html5domdocument.loadhtmlfile.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.loadhtmlfile.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::loadHTMLFile -Load HTML from a file +Load HTML from a file. ```php public void loadHTMLFile ( string $filename [, int $options = 0 ] ) @@ -10,11 +10,11 @@ public void loadHTMLFile ( string $filename [, int $options = 0 ] )       `$filename` -            The path to the HTML file +            The path to the HTML file.       `$options` -            Additional Libxml parameters +            Additional Libxml parameters. ## Returns diff --git a/docs/markdown/ivopetkov.html5domdocument.queryselector.method.md b/docs/markdown/ivopetkov.html5domdocument.queryselector.method.md index ee33c2b..1d15e08 100644 --- a/docs/markdown/ivopetkov.html5domdocument.queryselector.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.queryselector.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::querySelector -Returns the first document element matching the selector +Returns the first document element matching the selector. ```php public DOMElement|null querySelector ( string $selector ) @@ -10,11 +10,11 @@ public DOMElement|null querySelector ( string $selector )       `$selector` -            CSS query selector +            A CSS query selector. Available values: *, tagname, tagname#id, #id, tagname.classname, .classname, tagname[attribute-selector] and [attribute-selector]. ## Returns -      The result DOMElement or null if not found +      The result DOMElement or null if not found. ## Details diff --git a/docs/markdown/ivopetkov.html5domdocument.queryselectorall.method.md b/docs/markdown/ivopetkov.html5domdocument.queryselectorall.method.md index 2031d47..4329dfd 100644 --- a/docs/markdown/ivopetkov.html5domdocument.queryselectorall.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.queryselectorall.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::querySelectorAll -Returns a list of document elements matching the selector +Returns a list of document elements matching the selector. ```php public DOMNodeList querySelectorAll ( string $selector ) @@ -10,11 +10,11 @@ public DOMNodeList querySelectorAll ( string $selector )       `$selector` -            CSS query selector +            A CSS query selector. Available values: *, tagname, tagname#id, #id, tagname.classname, .classname, tagname[attribute-selector] and [attribute-selector]. ## Returns -      Returns a list of DOMElements matching the criteria +      Returns a list of DOMElements matching the criteria. ## Details diff --git a/docs/markdown/ivopetkov.html5domdocument.savehtml.method.md b/docs/markdown/ivopetkov.html5domdocument.savehtml.method.md index ac0026e..8576d9c 100644 --- a/docs/markdown/ivopetkov.html5domdocument.savehtml.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.savehtml.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::saveHTML -Dumps the internal document into a string using HTML formatting +Dumps the internal document into a string using HTML formatting. ```php public string saveHTML ( [ DOMNode $node ] ) @@ -14,7 +14,7 @@ public string saveHTML ( [ DOMNode $node ] ) ## Returns -      The document (or node) HTML code as string +      The document (or node) HTML code as string. ## Details diff --git a/docs/markdown/ivopetkov.html5domdocument.savehtmlfile.method.md b/docs/markdown/ivopetkov.html5domdocument.savehtmlfile.method.md index 2f63fdc..ba2d93b 100644 --- a/docs/markdown/ivopetkov.html5domdocument.savehtmlfile.method.md +++ b/docs/markdown/ivopetkov.html5domdocument.savehtmlfile.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMDocument::saveHTMLFile -Dumps the internal document into a file using HTML formatting +Dumps the internal document into a file using HTML formatting. ```php public int saveHTMLFile ( string $filename ) @@ -14,7 +14,7 @@ public int saveHTMLFile ( string $filename ) ## Returns -      the number of bytes written or FALSE if an error occurred +      the number of bytes written or FALSE if an error occurred. ## Details diff --git a/docs/markdown/ivopetkov.html5domelement.class.md b/docs/markdown/ivopetkov.html5domelement.class.md index 6246e79..33705c1 100644 --- a/docs/markdown/ivopetkov.html5domelement.class.md +++ b/docs/markdown/ivopetkov.html5domelement.class.md @@ -2,37 +2,39 @@ extends [DOMElement](http://php.net/manual/en/class.domelement.php) +Represents a live (can be manipulated) representation of an element in a HTML5 document. + ## Properties ##### public [IvoPetkov\HTML5DOMTokenList](ivopetkov.html5domtokenlist.class.md) $classList -      A collection of the class attributes of the element +      A collection of the class attributes of the element. -##### public readonly string $innerHTML +##### public string $innerHTML -      The HTML code inside the element +      The HTML code inside the element. -##### public readonly string $outerHTML +##### public string $outerHTML -      The HTML code for the element including the code inside +      The HTML code for the element including the code inside. ## Methods ##### public string [getAttribute](ivopetkov.html5domelement.getattribute.method.md) ( string $name ) -      Returns the value for the attribute name specified +      Returns the value for the attribute name specified. ##### public array [getAttributes](ivopetkov.html5domelement.getattributes.method.md) ( void ) -      Returns an array containing all attributes +      Returns an array containing all attributes. ##### public [DOMElement](http://php.net/manual/en/class.domelement.php)|null [querySelector](ivopetkov.html5domelement.queryselector.method.md) ( string $selector ) -      Returns the first child element matching the selector +      Returns the first child element matching the selector. ##### public [DOMNodeList](http://php.net/manual/en/class.domnodelist.php) [querySelectorAll](ivopetkov.html5domelement.queryselectorall.method.md) ( string $selector ) -      Returns a list of children elements matching the selector +      Returns a list of children elements matching the selector. ### Inherited from DOMNode: diff --git a/docs/markdown/ivopetkov.html5domelement.getattribute.method.md b/docs/markdown/ivopetkov.html5domelement.getattribute.method.md index 8ef71d8..8b362b2 100644 --- a/docs/markdown/ivopetkov.html5domelement.getattribute.method.md +++ b/docs/markdown/ivopetkov.html5domelement.getattribute.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMElement::getAttribute -Returns the value for the attribute name specified +Returns the value for the attribute name specified. ```php public string getAttribute ( string $name ) @@ -10,11 +10,11 @@ public string getAttribute ( string $name )       `$name` -            The attribute name +            The attribute name. ## Returns -       +      The attribute value. ## Details diff --git a/docs/markdown/ivopetkov.html5domelement.getattributes.method.md b/docs/markdown/ivopetkov.html5domelement.getattributes.method.md index f31dbcb..10d047b 100644 --- a/docs/markdown/ivopetkov.html5domelement.getattributes.method.md +++ b/docs/markdown/ivopetkov.html5domelement.getattributes.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMElement::getAttributes -Returns an array containing all attributes +Returns an array containing all attributes. ```php public array getAttributes ( void ) @@ -8,7 +8,7 @@ public array getAttributes ( void ) ## Returns -      An associative array containing all attributes +      An associative array containing all attributes. ## Details diff --git a/docs/markdown/ivopetkov.html5domelement.queryselector.method.md b/docs/markdown/ivopetkov.html5domelement.queryselector.method.md index 9165f1a..dec4030 100644 --- a/docs/markdown/ivopetkov.html5domelement.queryselector.method.md +++ b/docs/markdown/ivopetkov.html5domelement.queryselector.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMElement::querySelector -Returns the first child element matching the selector +Returns the first child element matching the selector. ```php public DOMElement|null querySelector ( string $selector ) @@ -10,11 +10,11 @@ public DOMElement|null querySelector ( string $selector )       `$selector` -            CSS query selector +            A CSS query selector. Available values: *, tagname, tagname#id, #id, tagname.classname, .classname, tagname[attribute-selector] and [attribute-selector]. ## Returns -      The result DOMElement or null if not found +      The result DOMElement or null if not found. ## Details diff --git a/docs/markdown/ivopetkov.html5domelement.queryselectorall.method.md b/docs/markdown/ivopetkov.html5domelement.queryselectorall.method.md index 6c19365..7ef80ce 100644 --- a/docs/markdown/ivopetkov.html5domelement.queryselectorall.method.md +++ b/docs/markdown/ivopetkov.html5domelement.queryselectorall.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMElement::querySelectorAll -Returns a list of children elements matching the selector +Returns a list of children elements matching the selector. ```php public DOMNodeList querySelectorAll ( string $selector ) @@ -10,11 +10,11 @@ public DOMNodeList querySelectorAll ( string $selector )       `$selector` -            CSS query selector +            A CSS query selector. Available values: *, tagname, tagname#id, #id, tagname.classname, .classname, tagname[attribute-selector] and [attribute-selector]. ## Returns -      Returns a list of DOMElements matching the criteria +      Returns a list of DOMElements matching the criteria. ## Details diff --git a/docs/markdown/ivopetkov.html5domnodelist.class.md b/docs/markdown/ivopetkov.html5domnodelist.class.md index 1dde8aa..c5be316 100644 --- a/docs/markdown/ivopetkov.html5domnodelist.class.md +++ b/docs/markdown/ivopetkov.html5domnodelist.class.md @@ -4,6 +4,8 @@ extends [ArrayObject](http://php.net/manual/en/class.arrayobject.php) implements [Countable](http://php.net/manual/en/class.countable.php), [Serializable](http://php.net/manual/en/class.serializable.php), [ArrayAccess](http://php.net/manual/en/class.arrayaccess.php), [Traversable](http://php.net/manual/en/class.traversable.php), [IteratorAggregate](http://php.net/manual/en/class.iteratoraggregate.php) +Represents a list of DOM nodes. + ## Constants ##### const integer ARRAY_AS_PROPS @@ -20,7 +22,7 @@ implements [Countable](http://php.net/manual/en/class.countable.php), [Serializa ##### public [IvoPetkov\HTML5DOMElement](ivopetkov.html5domelement.class.md)|null [item](ivopetkov.html5domnodelist.item.method.md) ( int $index ) -      Returns the item at the specified index +      Returns the item at the specified index. ### Inherited from ArrayObject: diff --git a/docs/markdown/ivopetkov.html5domnodelist.item.method.md b/docs/markdown/ivopetkov.html5domnodelist.item.method.md index b9134c2..8f57275 100644 --- a/docs/markdown/ivopetkov.html5domnodelist.item.method.md +++ b/docs/markdown/ivopetkov.html5domnodelist.item.method.md @@ -1,6 +1,6 @@ # IvoPetkov\HTML5DOMNodeList::item -Returns the item at the specified index +Returns the item at the specified index. ```php public IvoPetkov\HTML5DOMElement|null item ( int $index ) @@ -10,11 +10,11 @@ public IvoPetkov\HTML5DOMElement|null item ( int $index )       `$index` -            The item index +            The item index. ## Returns -      The item at the specified index or null if not existent +      The item at the specified index or null if not existent. ## Details diff --git a/docs/markdown/ivopetkov.html5domtokenlist.class.md b/docs/markdown/ivopetkov.html5domtokenlist.class.md index d429024..eb28033 100644 --- a/docs/markdown/ivopetkov.html5domtokenlist.class.md +++ b/docs/markdown/ivopetkov.html5domtokenlist.class.md @@ -6,6 +6,12 @@ Represents a set of space-separated tokens of an element attribute. ##### public readonly int $length +      The number of tokens. + +##### public readonly string $value + +      A space-separated list of the tokens. + ## Methods ##### public [__construct](ivopetkov.html5domtokenlist.__construct.method.md) ( [DOMElement](http://php.net/manual/en/class.domelement.php) $element , string $attributeName ) diff --git a/docs/markdown/ivopetkov.html5domtokenlist.contains.method.md b/docs/markdown/ivopetkov.html5domtokenlist.contains.method.md index bcfea50..fdf590a 100644 --- a/docs/markdown/ivopetkov.html5domtokenlist.contains.method.md +++ b/docs/markdown/ivopetkov.html5domtokenlist.contains.method.md @@ -10,7 +10,7 @@ public bool contains ( string $token )       `$token` -            The token you want to check for the existance of in the list. +            The token you want to check for the existence of in the list. ## Returns