PHPackages                             gyuco/domtemplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. gyuco/domtemplate

ActiveLibrary[Templating &amp; Views](/categories/templating)

gyuco/domtemplate
=================

DomTemplate engine forked from Kroc/DOMTemplate

1.0(10y ago)05551[1 PRs](https://github.com/gyuco/DOMTemplate/pulls)MITPHPPHP &gt;=5.3.0

Since Oct 9Pushed 10y ago2 watchersCompare

[ Source](https://github.com/gyuco/DOMTemplate)[ Packagist](https://packagist.org/packages/gyuco/domtemplate)[ Docs](https://github.com/gyuco/DOMTemplate.git)[ RSS](/packages/gyuco-domtemplate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

DOMTemplate
===========

[](#domtemplate)

A templating engine that manipulates static HTML using DOM &amp; XPath so as to separate template and logic

Basic API:

```
new DOMTemplate (source, [namespaces])

(string)				to output the HTML / XML, cast the DOMTemplate object to a string,
					i.e. `echo $template;`
query (query)				make an XPath query
set (queries, [asHTML])			change HTML by specifying an array of ('XPath' => 'value')
setValue (query, value, [asHTML])	change a single HTML value with an XPath query
addClass (query, new_class)		add a class to an HTML element
remove (query)				remove one or more HTML elements, attributes or classes
repeat (query)				return one (or more) elements as sub-templates

	next ()				append the sub-template to the list and reset its content

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3874d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ccd8065d9a42fc77e9d9fe9b4a1c974e1b3975951af2050bac4fb5d652a461f3?d=identicon)[giuseppe.concas](/maintainers/giuseppe.concas)

---

Top Contributors

[![Kroc](https://avatars.githubusercontent.com/u/142650?v=4)](https://github.com/Kroc "Kroc (25 commits)")[![gyuco](https://avatars.githubusercontent.com/u/340937?v=4)](https://github.com/gyuco "gyuco (7 commits)")[![nkrs](https://avatars.githubusercontent.com/u/114546?v=4)](https://github.com/nkrs "nkrs (4 commits)")[![olace](https://avatars.githubusercontent.com/u/483280?v=4)](https://github.com/olace "olace (1 commits)")[![Zegnat](https://avatars.githubusercontent.com/u/490579?v=4)](https://github.com/Zegnat "Zegnat (1 commits)")

---

Tags

domtemplate engine

### Embed Badge

![Health badge](/badges/gyuco-domtemplate/health.svg)

```
[![Health](https://phpackages.com/badges/gyuco-domtemplate/health.svg)](https://phpackages.com/packages/gyuco-domtemplate)
```

###  Alternatives

[phptal/phptal

PHPTAL is a templating engine for PHP5 that implements Zope Page Templates syntax

179421.6k19](/packages/phptal-phptal)[foil/foil

PHP template engine for native PHP templates

170111.2k7](/packages/foil-foil)[sinnbeck/laravel-dom-assertions

106250.5k8](/packages/sinnbeck-laravel-dom-assertions)[proai/laravel-handlebars

A Laravel wrapper for LightnCandy for using the Handlebars (and Mustache) template engine.

38204.7k](/packages/proai-laravel-handlebars)[talesoft/tale-pug

A clean, lightweight and easy-to-use templating engine for PHP based on Pug, formerly Jade

319.4k3](/packages/talesoft-tale-pug)[wanze/template-engine-factory

Provides ProcessWire integration for various template engines such as Twig.

2612.0k4](/packages/wanze-template-engine-factory)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
