Skip to content

Artefact2/easydom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

easydom

A very simple wrapper around PHP DOM. Designed to reduce the amount of boilerplate code and un-needed verbosity.

Document (DOMDocument, Appendable)
    ::element(string $name, array $children = []): Element

Element (DOMElement, Appendable, Insertable, Removable, Renderable)
    ::attr(string $name): string
    ::attr(string $name, string $value): Element
    ::hasClass(string $class): bool
    ::addClass(string $class): Element
    ::closestParent(string $name): Element

Node (DOMNode, Appendable, Insertable, Removable, Renderable)

Appendable
    ::append2($content): Appendable
    ::prepend2($content): Appendable
    ::appendCreate(<same as Document::element()>): Element

Insertable
    ::before2(Node $node): void
    ::after2(Node $node): void

Removable
    ::remove(): void

Renderable
    ::renderNode(): string

About

A DOM wrapper that won't make your brain melt

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages