PHPackages                             noi/querypath-repeat - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. noi/querypath-repeat

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

noi/querypath-repeat
====================

QueryPath extension that adds extra methods for repeating selected elements

v1.0(12y ago)019MITPHPPHP &gt;=5.3.0

Since Oct 10Pushed 12y ago1 watchersCompare

[ Source](https://github.com/noisan/querypath-repeat)[ Packagist](https://packagist.org/packages/noi/querypath-repeat)[ RSS](/packages/noi-querypath-repeat/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

QueryPath RepeatExtension
=========================

[](#querypath-repeatextension)

RepeatExtension is a [QueryPath](http://querypath.org/) extension that adds the following methods:

1. `repeat($counter [, $callback])`
2. `repeatInner($counter [, $callback])`

Installation
------------

[](#installation)

With [Composer](http://getcomposer.org/), run:

```
$ php composer.phar require noi/querypath-repeat "*"
```

Alternatively, you can edit your `composer.json` manually and add the following:

```
{
    "require": {
        "noi/querypath-repeat": "*"
    }
}
```

Usage
-----

[](#usage)

### repeat()

[](#repeat)

```
\QueryPath\DOMQuery repeat(int|array|\Traversable $counter [, callable $callback ])
```

A quick example:

```

  Test
  Test
  Test
  Test
  Test

```

And here is an example with a callback function:

```

  Test:0
  Test:1
  Test:2
  APPLE
  ORANGE
  LEMON

```

### repeatInner()

[](#repeatinner)

```
\QueryPath\DOMQuery repeatInner(int|array|\Traversable $counter [, callable $callback ])
```

A quick example:

```

  TestTestTest

    Child A
    Child B
    Child A
    Child B
    Child A
    Child B

```

And here is an example with a callback function:

```

  012

    APPLE
    ORANGE
    LEMON

```

License
-------

[](#license)

RepeatExtension is licensed under the MIT License - see the `LICENSE` file for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

4599d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4274393838d65174b84edd63fc13e6e764e590f5b2c0855d1a073630ec11096?d=identicon)[noisan](/maintainers/noisan)

---

Top Contributors

[![noisan](https://avatars.githubusercontent.com/u/5478214?v=4)](https://github.com/noisan "noisan (19 commits)")

---

Tags

xmlhtmlquerypathjqueryextensionxhtmlrepeat

### Embed Badge

![Health badge](/badges/noi-querypath-repeat/health.svg)

```
[![Health](https://phpackages.com/badges/noi-querypath-repeat/health.svg)](https://phpackages.com/packages/noi-querypath-repeat)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[querypath/querypath

HTML/XML querying and processing (like jQuery)

8197.0M27](/packages/querypath-querypath)[rct567/dom-query

DomQuery is a PHP library that allows easy 'jQuery like' DOM traversing and manipulation

134261.0k4](/packages/rct567-dom-query)[gravitypdf/querypath

PHP library for HTML(5)/XML querying (CSS 4 or XPath) and processing (like jQuery) with PHP 7.1 to 8.5 support

281.2M1](/packages/gravitypdf-querypath)[machy8/xhtml-formatter

Simple, lightweight, customizable (X)HTML and XML formatter / beautifier.

13181.6k7](/packages/machy8-xhtml-formatter)[hexydec/htmldoc

A token based HTML document parser and minifier. Minify HTML documents including inline CSS, Javascript, and SVG's on the fly. Extract document text, attributes, and fragments. Full test suite.

2610.3k3](/packages/hexydec-htmldoc)

PHPackages © 2026

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