PHPackages                             rootwork/phalcon-view-stringable - 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. rootwork/phalcon-view-stringable

ActiveLibrary

rootwork/phalcon-view-stringable
================================

A Phalcon 2 View library for rendering string templates

126PHP

Since May 2Pushed 10y ago3 watchersCompare

[ Source](https://github.com/rootworkit/phalcon-view-stringable)[ Packagist](https://packagist.org/packages/rootwork/phalcon-view-stringable)[ RSS](/packages/rootwork-phalcon-view-stringable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

phalcon-view-stringable
=======================

[](#phalcon-view-stringable)

Phalcon view class that adds string rendering ability for Phalcon 2.

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

[](#installation)

Install composer in a common location or in your project:

```
curl -s http://getcomposer.org/installer | php
```

Create the composer.json file as follows:

```
{
    "require": {
        "rootwork/phalcon-view-stringable": "dev-master"
    }
}
```

Run the composer installer:

```
php composer.phar install
```

Usage
-----

[](#usage)

### Loading the view service

[](#loading-the-view-service)

```
// app/config/services.php
use Rootwork\Phalcon\Mvc\View\Stringable as View;

$di->setShared('view', function () use ($config) {
    $view = new View();
    $view->setViewsDir(APP_PATH . '/app/views/');
    $view->setOptions([
        'stringCompilePath' => APP_PATH . '/app/views/string-compile',
        'stringCompileExt'  => '.phtml',
    ]);
    $view->registerEngines([
        'string'    => 'Phalcon\Mvc\View\Engine\Volt',
        '.phtml'    => 'Phalcon\Mvc\View\Engine\Php',
    ]);

    return $view;
});
```

### Rendering string templates

[](#rendering-string-templates)

```
// In controller, model, or anywhere Phalcon Di is available
$view       = $this->getDI()->getShared('view');
$template   = "The quick {{ color }} {{ animal }} jumps over the
               lazy {{ pet }}.";

$view->color    = 'brown';
$view->animal   = 'fox';
$view->pet      = 'dog';

// Simple, immediate rendering
echo $view->renderString($template);

// Hierarchical rendering
$view
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![mikesoule](https://avatars.githubusercontent.com/u/235210?v=4)](https://github.com/mikesoule "mikesoule (7 commits)")

### Embed Badge

![Health badge](/badges/rootwork-phalcon-view-stringable/health.svg)

```
[![Health](https://phpackages.com/badges/rootwork-phalcon-view-stringable/health.svg)](https://phpackages.com/packages/rootwork-phalcon-view-stringable)
```

PHPackages © 2026

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