Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopetkov committed Nov 24, 2023
1 parent cbbe2d5 commit 3eccd3c
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Creates a new HTML5DOMDocument object.

```php
public __construct ( [ string $version [, string $encoding ]] )
public __construct ( [ string $version = '1.0' [, string $encoding = '' ]] )
```

## Parameters
Expand Down
191 changes: 137 additions & 54 deletions docs/markdown/ivopetkov.html5domdocument.class.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Load HTML from a file.

```php
public void loadHTMLFile ( string $filename [, int $options = 0 ] )
public bool loadHTMLFile ( string $filename [, int $options = 0 ] )
```

## Parameters
Expand Down
1 change: 1 addition & 0 deletions docs/markdown/ivopetkov.html5domdocument.modify.method.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public void modify ( [ int $modifications = 0 ] )
- HTML5DOMDocument::FIX_MULTIPLE_HEADS - merges multiple head elements.
- HTML5DOMDocument::FIX_MULTIPLE_BODIES - merges multiple body elements.
- HTML5DOMDocument::OPTIMIZE_HEAD - moves charset metatag and title elements first.
- HTML5DOMDocument::FIX_DUPLICATE_STYLES - removes all but first styles with duplicate content.

## Details

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Dumps the internal document into a file using HTML formatting.

```php
public int saveHTMLFile ( string $filename )
public int|false saveHTMLFile ( string $filename )
```

## Parameters
Expand Down
140 changes: 100 additions & 40 deletions docs/markdown/ivopetkov.html5domelement.class.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Represents a live (can be manipulated) representation of an element in a HTML5 document.

```php
IvoPetkov\HTML5DOMElement extends DOMElement {
IvoPetkov\HTML5DOMElement extends DOMElement implements DOMParentNode, DOMChildNode, Stringable {

/* Properties */
public IvoPetkov\HTML5DOMTokenList $classList
Expand All @@ -25,6 +25,14 @@ IvoPetkov\HTML5DOMElement extends DOMElement {

##### [DOMElement](http://php.net/manual/en/class.domelement.php)

## Implements

##### [DOMParentNode](http://php.net/manual/en/class.domparentnode.php)

##### [DOMChildNode](http://php.net/manual/en/class.domchildnode.php)

##### [Stringable](http://php.net/manual/en/class.stringable.php)

## Properties

##### public [IvoPetkov\HTML5DOMTokenList](ivopetkov.html5domtokenlist.class.md) $classList
Expand All @@ -39,6 +47,56 @@ IvoPetkov\HTML5DOMElement extends DOMElement {

      The HTML code for the element including the code inside.

### Inherited from [DOMElement](http://php.net/manual/en/class.domelement.php)

##### public $childElementCount

##### public $firstElementChild

##### public $lastElementChild

##### public $nextElementSibling

##### public $previousElementSibling

##### public $schemaTypeInfo

##### public $tagName

### Inherited from [DOMNode](http://php.net/manual/en/class.domnode.php)

##### public $attributes

##### public $baseURI

##### public $childNodes

##### public $firstChild

##### public $lastChild

##### public $localName

##### public $namespaceURI

##### public $nextSibling

##### public $nodeName

##### public $nodeType

##### public $nodeValue

##### public $ownerDocument

##### public $parentNode

##### public $prefix

##### public $previousSibling

##### public $textContent

## Methods

##### public string [getAttribute](ivopetkov.html5domelement.getattribute.method.md) ( string $name )
Expand Down Expand Up @@ -67,87 +125,89 @@ IvoPetkov\HTML5DOMElement extends DOMElement {

### Inherited from [DOMElement](http://php.net/manual/en/class.domelement.php)

##### public [__construct](http://php.net/manual/en/domelement.construct.php) ( $name [, $value [, $uri ]] )
##### public [__construct](http://php.net/manual/en/domelement.construct.php) ( string $qualifiedName [, string|null $value [, string $namespace = '' ]] )

##### public void [getAttributeNS](http://php.net/manual/en/domelement.getattributens.php) ( $namespaceURI , $localName )
##### public void [after](http://php.net/manual/en/domelement.after.php) ( [ $nodes ] )

##### public void [getAttributeNode](http://php.net/manual/en/domelement.getattributenode.php) ( $name )
##### public void [append](http://php.net/manual/en/domelement.append.php) ( [ $nodes ] )

##### public void [getAttributeNodeNS](http://php.net/manual/en/domelement.getattributenodens.php) ( $namespaceURI , $localName )
##### public void [before](http://php.net/manual/en/domelement.before.php) ( [ $nodes ] )

##### public void [getElementsByTagName](http://php.net/manual/en/domelement.getelementsbytagname.php) ( $name )
##### public void [getAttributeNS](http://php.net/manual/en/domelement.getattributens.php) ( string|null $namespace , string $localName )

##### public void [getElementsByTagNameNS](http://php.net/manual/en/domelement.getelementsbytagnamens.php) ( $namespaceURI , $localName )
##### public void [getAttributeNode](http://php.net/manual/en/domelement.getattributenode.php) ( string $qualifiedName )

##### public void [hasAttribute](http://php.net/manual/en/domelement.hasattribute.php) ( $name )
##### public void [getAttributeNodeNS](http://php.net/manual/en/domelement.getattributenodens.php) ( string|null $namespace , string $localName )

##### public void [hasAttributeNS](http://php.net/manual/en/domelement.hasattributens.php) ( $namespaceURI , $localName )
##### public void [getElementsByTagName](http://php.net/manual/en/domelement.getelementsbytagname.php) ( string $qualifiedName )

##### public void [removeAttribute](http://php.net/manual/en/domelement.removeattribute.php) ( $name )
##### public void [getElementsByTagNameNS](http://php.net/manual/en/domelement.getelementsbytagnamens.php) ( string|null $namespace , string $localName )

##### public void [removeAttributeNS](http://php.net/manual/en/domelement.removeattributens.php) ( $namespaceURI , $localName )
##### public void [hasAttribute](http://php.net/manual/en/domelement.hasattribute.php) ( string $qualifiedName )

##### public void [removeAttributeNode](http://php.net/manual/en/domelement.removeattributenode.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $oldAttr )
##### public void [hasAttributeNS](http://php.net/manual/en/domelement.hasattributens.php) ( string|null $namespace , string $localName )

##### public void [setAttribute](http://php.net/manual/en/domelement.setattribute.php) ( $name , $value )
##### public void [prepend](http://php.net/manual/en/domelement.prepend.php) ( [ $nodes ] )

##### public void [setAttributeNS](http://php.net/manual/en/domelement.setattributens.php) ( $namespaceURI , $qualifiedName , $value )
##### public void [remove](http://php.net/manual/en/domelement.remove.php) ( void )

##### public void [setAttributeNode](http://php.net/manual/en/domelement.setattributenode.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $newAttr )
##### public void [removeAttribute](http://php.net/manual/en/domelement.removeattribute.php) ( string $qualifiedName )

##### public void [setAttributeNodeNS](http://php.net/manual/en/domelement.setattributenodens.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $newAttr )
##### public void [removeAttributeNS](http://php.net/manual/en/domelement.removeattributens.php) ( string|null $namespace , string $localName )

##### public void [setIdAttribute](http://php.net/manual/en/domelement.setidattribute.php) ( $name , $isId )
##### public void [removeAttributeNode](http://php.net/manual/en/domelement.removeattributenode.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $attr )

##### public void [setIdAttributeNS](http://php.net/manual/en/domelement.setidattributens.php) ( $namespaceURI , $localName , $isId )
##### public void [replaceWith](http://php.net/manual/en/domelement.replacewith.php) ( [ $nodes ] )

##### public void [setIdAttributeNode](http://php.net/manual/en/domelement.setidattributenode.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $attr , $isId )
##### public void [setAttribute](http://php.net/manual/en/domelement.setattribute.php) ( string $qualifiedName , string $value )

### Inherited from [DOMNode](http://php.net/manual/en/class.domnode.php)
##### public void [setAttributeNS](http://php.net/manual/en/domelement.setattributens.php) ( string|null $namespace , string $qualifiedName , string $value )

##### public void [setAttributeNode](http://php.net/manual/en/domelement.setattributenode.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $attr )

##### public void [setAttributeNodeNS](http://php.net/manual/en/domelement.setattributenodens.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $attr )

##### public void [setIdAttribute](http://php.net/manual/en/domelement.setidattribute.php) ( string $qualifiedName , bool $isId )

##### public void [C14N](http://php.net/manual/en/domnode.c14n.php) ( [ $exclusive [, $with_comments [, array $xpath [, array $ns_prefixes ]]]] )
##### public void [setIdAttributeNS](http://php.net/manual/en/domelement.setidattributens.php) ( string $namespace , string $qualifiedName , bool $isId )

##### public void [C14NFile](http://php.net/manual/en/domnode.c14nfile.php) ( $uri [, $exclusive [, $with_comments [, array $xpath [, array $ns_prefixes ]]]] )
##### public void [setIdAttributeNode](http://php.net/manual/en/domelement.setidattributenode.php) ( [DOMAttr](http://php.net/manual/en/class.domattr.php) $attr , bool $isId )

##### public void [appendChild](http://php.net/manual/en/domnode.appendchild.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $newChild )
### Inherited from [DOMNode](http://php.net/manual/en/class.domnode.php)

##### public void [C14N](http://php.net/manual/en/domnode.c14n.php) ( [ bool $exclusive = false [, bool $withComments = false [, array|null $xpath [, array|null $nsPrefixes ]]]] )

##### public void [cloneNode](http://php.net/manual/en/domnode.clonenode.php) ( $deep )
##### public void [C14NFile](http://php.net/manual/en/domnode.c14nfile.php) ( string $uri [, bool $exclusive = false [, bool $withComments = false [, array|null $xpath [, array|null $nsPrefixes ]]]] )

##### public void [compareDocumentPosition](http://php.net/manual/en/domnode.comparedocumentposition.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $other )
##### public void [appendChild](http://php.net/manual/en/domnode.appendchild.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $node )

##### public void [getFeature](http://php.net/manual/en/domnode.getfeature.php) ( $feature , $version )
##### public void [cloneNode](http://php.net/manual/en/domnode.clonenode.php) ( [ bool $deep = false ] )

##### public void [getLineNo](http://php.net/manual/en/domnode.getlineno.php) ( void )

##### public void [getNodePath](http://php.net/manual/en/domnode.getnodepath.php) ( void )

##### public void [getUserData](http://php.net/manual/en/domnode.getuserdata.php) ( $key )

##### public void [hasAttributes](http://php.net/manual/en/domnode.hasattributes.php) ( void )

##### public void [hasChildNodes](http://php.net/manual/en/domnode.haschildnodes.php) ( void )

##### public void [insertBefore](http://php.net/manual/en/domnode.insertbefore.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $newChild [, [DOMNode](http://php.net/manual/en/class.domnode.php) $refChild ] )
##### public void [insertBefore](http://php.net/manual/en/domnode.insertbefore.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $node [, [DOMNode](http://php.net/manual/en/class.domnode.php)|null $child ] )

##### public void [isDefaultNamespace](http://php.net/manual/en/domnode.isdefaultnamespace.php) ( $namespaceURI )
##### public void [isDefaultNamespace](http://php.net/manual/en/domnode.isdefaultnamespace.php) ( string $namespace )

##### public void [isEqualNode](http://php.net/manual/en/domnode.isequalnode.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $arg )
##### public void [isSameNode](http://php.net/manual/en/domnode.issamenode.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $otherNode )

##### public void [isSameNode](http://php.net/manual/en/domnode.issamenode.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $other )
##### public void [isSupported](http://php.net/manual/en/domnode.issupported.php) ( string $feature , string $version )

##### public void [isSupported](http://php.net/manual/en/domnode.issupported.php) ( $feature , $version )
##### public void [lookupNamespaceURI](http://php.net/manual/en/domnode.lookupnamespaceuri.php) ( string|null $prefix )

##### public void [lookupNamespaceUri](http://php.net/manual/en/domnode.lookupnamespaceuri.php) ( $prefix )

##### public void [lookupPrefix](http://php.net/manual/en/domnode.lookupprefix.php) ( $namespaceURI )
##### public void [lookupPrefix](http://php.net/manual/en/domnode.lookupprefix.php) ( string $namespace )

##### public void [normalize](http://php.net/manual/en/domnode.normalize.php) ( void )

##### public void [removeChild](http://php.net/manual/en/domnode.removechild.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $oldChild )

##### public void [replaceChild](http://php.net/manual/en/domnode.replacechild.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $newChild , [DOMNode](http://php.net/manual/en/class.domnode.php) $oldChild )
##### public void [removeChild](http://php.net/manual/en/domnode.removechild.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $child )

##### public void [setUserData](http://php.net/manual/en/domnode.setuserdata.php) ( $key , $data , $handler )
##### public void [replaceChild](http://php.net/manual/en/domnode.replacechild.php) ( [DOMNode](http://php.net/manual/en/class.domnode.php) $node , [DOMNode](http://php.net/manual/en/class.domnode.php) $child )

## Details

Expand Down
30 changes: 10 additions & 20 deletions docs/markdown/ivopetkov.html5domnodelist.class.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ Represents a list of DOM nodes.
```php
IvoPetkov\HTML5DOMNodeList extends ArrayObject implements Countable, Serializable, ArrayAccess, Traversable, IteratorAggregate {

/* Constants */
const int ARRAY_AS_PROPS
const int STD_PROP_LIST

/* Properties */
public readonly int $length

Expand All @@ -34,12 +30,6 @@ IvoPetkov\HTML5DOMNodeList extends ArrayObject implements Countable, Serializabl

##### [IteratorAggregate](http://php.net/manual/en/class.iteratoraggregate.php)

## Constants

##### const int ARRAY_AS_PROPS

##### const int STD_PROP_LIST

## Properties

##### public readonly int $length
Expand All @@ -54,15 +44,15 @@ IvoPetkov\HTML5DOMNodeList extends ArrayObject implements Countable, Serializabl

### Inherited from [ArrayObject](http://php.net/manual/en/class.arrayobject.php)

##### public [__construct](http://php.net/manual/en/arrayobject.construct.php) ( [ $array [, $ar_flags [, $iterator_class ]]] )
##### public [__construct](http://php.net/manual/en/arrayobject.construct.php) ( [ object|array $array = [] [, int $flags = 0 [, string $iteratorClass = 'ArrayIterator' ]]] )

##### public void [append](http://php.net/manual/en/arrayobject.append.php) ( $value )
##### public void [append](http://php.net/manual/en/arrayobject.append.php) ( mixed $value )

##### public void [asort](http://php.net/manual/en/arrayobject.asort.php) ( void )
##### public void [asort](http://php.net/manual/en/arrayobject.asort.php) ( [ int $flags = 0 ] )

##### public void [count](http://php.net/manual/en/arrayobject.count.php) ( void )

##### public void [exchangeArray](http://php.net/manual/en/arrayobject.exchangearray.php) ( $array )
##### public void [exchangeArray](http://php.net/manual/en/arrayobject.exchangearray.php) ( object|array $array )

##### public void [getArrayCopy](http://php.net/manual/en/arrayobject.getarraycopy.php) ( void )

Expand All @@ -72,23 +62,23 @@ IvoPetkov\HTML5DOMNodeList extends ArrayObject implements Countable, Serializabl

##### public void [getIteratorClass](http://php.net/manual/en/arrayobject.getiteratorclass.php) ( void )

##### public void [ksort](http://php.net/manual/en/arrayobject.ksort.php) ( void )
##### public void [ksort](http://php.net/manual/en/arrayobject.ksort.php) ( [ int $flags = 0 ] )

##### public void [natcasesort](http://php.net/manual/en/arrayobject.natcasesort.php) ( void )

##### public void [natsort](http://php.net/manual/en/arrayobject.natsort.php) ( void )

##### public void [serialize](http://php.net/manual/en/arrayobject.serialize.php) ( void )

##### public void [setFlags](http://php.net/manual/en/arrayobject.setflags.php) ( $flags )
##### public void [setFlags](http://php.net/manual/en/arrayobject.setflags.php) ( int $flags )

##### public void [setIteratorClass](http://php.net/manual/en/arrayobject.setiteratorclass.php) ( $iteratorClass )
##### public void [setIteratorClass](http://php.net/manual/en/arrayobject.setiteratorclass.php) ( string $iteratorClass )

##### public void [uasort](http://php.net/manual/en/arrayobject.uasort.php) ( $cmp_function )
##### public void [uasort](http://php.net/manual/en/arrayobject.uasort.php) ( callable $callback )

##### public void [uksort](http://php.net/manual/en/arrayobject.uksort.php) ( $cmp_function )
##### public void [uksort](http://php.net/manual/en/arrayobject.uksort.php) ( callable $callback )

##### public void [unserialize](http://php.net/manual/en/arrayobject.unserialize.php) ( $serialized )
##### public void [unserialize](http://php.net/manual/en/arrayobject.unserialize.php) ( string $data )

## Details

Expand Down
6 changes: 5 additions & 1 deletion docs/markdown/ivopetkov.html5domtokenlist.class.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Represents a set of space-separated tokens of an element attribute.

```php
IvoPetkov\HTML5DOMTokenList {
IvoPetkov\HTML5DOMTokenList implements Stringable {

/* Properties */
public readonly int $length
Expand All @@ -22,6 +22,10 @@ IvoPetkov\HTML5DOMTokenList {
}
```

## Implements

##### [Stringable](http://php.net/manual/en/class.stringable.php)

## Properties

##### public readonly int $length
Expand Down

0 comments on commit 3eccd3c

Please sign in to comment.