PHPackages                             strukt/generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. strukt/generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

strukt/generator
================

Struk Generator

v1.1.2-alpha(1y ago)09771MITPHPPHP ^8.1

Since Mar 9Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/struktapp/strukt-generator)[ Packagist](https://packagist.org/packages/strukt/generator)[ RSS](/packages/strukt-generator/feed)WikiDiscussions master Synced 1mo ago

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

Strukt Generator
================

[](#strukt-generator)

[![Build Status](https://camo.githubusercontent.com/86f7e64c47a738cb7079ade16073b69c0efc110e622014b1e0f00273556ab789/68747470733a2f2f7472617669732d63692e6f72672f706974736f6c752f737472756b742d67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://packagist.org/packages/strukt/generator)[![Latest Stable Version](https://camo.githubusercontent.com/b73beebee5f0aa3fd4833bc06f30dc79bec337e956e7defa7282f0cfda530546/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f67656e657261746f722f762f737461626c65)](https://packagist.org/packages/strukt/generator)[![Total Downloads](https://camo.githubusercontent.com/6dba9023bbe6fc0049462d948b41e0926196e057ba092bf51836a4e9ed53206d/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f67656e657261746f722f646f776e6c6f616473)](https://packagist.org/packages/strukt/generator)[![Latest Unstable Version](https://camo.githubusercontent.com/6f4cf78b0d094d501647e1b561497efd846c6b0370fb9a5b1404ca3da68f16ba/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f67656e657261746f722f762f756e737461626c65)](https://packagist.org/packages/strukt/generator)[![License](https://camo.githubusercontent.com/e29efa03b0701850cef726d1e16ac25252e1523b19c9275df4a042160743d566/68747470733a2f2f706f7365722e707567782e6f72672f737472756b742f67656e657261746f722f6c6963656e7365)](https://packagist.org/packages/strukt/generator)

Intro
-----

[](#intro)

Simple package for generating templates and reading annotations.

Templator
---------

[](#templator)

```
$data = array(

    "title" => "The Title",
    "subtitle" => "Subtitle",
    "footer" => "Foot",
    "people" => array(

        array("name" => "Steve","surname" => "Johnson"),
        array("name" => "James", "surname" => "Johnson"),
        array("name" => "Josh", "surname" => "Smith")
    ),
    "page" => "Home"
);

$tpl = "
{{title}}

{{subtitle}}
{{begin:people}}
{{name}} {{surname}}
{{end:people}}

{{footer}}

";

// $output = Strukt\Templator::create($tpl, $data);
$output = template($tpl, $data);
```

Annotations
-----------

[](#annotations)

Annotation supported format:

```
/**
* @Route(/)
*/
class DefaultController{

    /**
    * @Route(/hello/{to:alpha})
    * @Method(POST, GET)
    * @Provides(application/html)
    */
    function hello($to){ ...

    /**
    * @Route(/login)
    * @Method(GET)
    * @Secure(username=test, password=test)
    * @Expects(username,password)
    *
    * note the below will not be parsed
    * @param str $username
    * @param str $password
    */
    function login($username, $password){ ...
```

Run parser:

```
// $parser = new \Strukt\Annotation\Parser\Basic(new \ReflectionClass(Controller\DefaultController::class));
// print_r($parser->getNotes());
print_r(notes(Controller\DefaultController::class))
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance60

Regular maintenance activity

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

Every ~226 days

Recently: every ~176 days

Total

6

Last Release

399d ago

PHP version history (2 changes)v1.0.0-alphaPHP &gt;=7.4

v1.1.0-alphaPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f77a56030c77ce25f7fcf6db800e45bb6a31bf3c07740b43aeabcdf5e9edec2?d=identicon)[pitsolu](/maintainers/pitsolu)

---

Top Contributors

[![pitsolu](https://avatars.githubusercontent.com/u/16669704?v=4)](https://github.com/pitsolu "pitsolu (56 commits)")[![samweru](https://avatars.githubusercontent.com/u/104033121?v=4)](https://github.com/samweru "samweru (3 commits)")

### Embed Badge

![Health badge](/badges/strukt-generator/health.svg)

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

PHPackages © 2026

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