Skip to content

Commit

Permalink
Docs update.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopetkov committed Aug 24, 2018
1 parent 5ff1c48 commit eab14da
Show file tree
Hide file tree
Showing 20 changed files with 73 additions and 55 deletions.
6 changes: 6 additions & 0 deletions docs/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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 ] )
Expand Down
18 changes: 10 additions & 8 deletions docs/markdown/ivopetkov.html5domdocument.class.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' ] )

Expand All @@ -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:

Expand Down
Original file line number Diff line number Diff line change
@@ -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 )
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
8 changes: 4 additions & 4 deletions docs/markdown/ivopetkov.html5domdocument.loadhtml.method.md
Original file line number Diff line number Diff line change
@@ -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 ] )
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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 ] )
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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 )
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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 )
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/ivopetkov.html5domdocument.savehtml.method.md
Original file line number Diff line number Diff line change
@@ -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 ] )
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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 )
Expand All @@ -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

Expand Down
20 changes: 11 additions & 9 deletions docs/markdown/ivopetkov.html5domelement.class.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
@@ -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 )
Expand All @@ -10,11 +10,11 @@ public string getAttribute ( string $name )

      `$name`

            The attribute name
            The attribute name.

## Returns

      
      The attribute value.

## Details

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# IvoPetkov\HTML5DOMElement::getAttributes

Returns an array containing all attributes
Returns an array containing all attributes.

```php
public array getAttributes ( void )
```

## Returns

      An associative array containing all attributes
      An associative array containing all attributes.

## Details

Expand Down
Original file line number Diff line number Diff line change
@@ -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 )
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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 )
Expand All @@ -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

Expand Down
4 changes: 3 additions & 1 deletion docs/markdown/ivopetkov.html5domnodelist.class.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down
Loading

0 comments on commit eab14da

Please sign in to comment.