PHPackages                             slepic/templated-tracy-bar-panel - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. slepic/templated-tracy-bar-panel

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

slepic/templated-tracy-bar-panel
================================

Generic implementaton of Tracy\\IBarPanel which allows you to implement IBarPanel factory classes instead of implementing IBarPanel directly.

0.2.1(5y ago)220.2k1BSD-3-ClausePHPPHP &gt;=5.6CI failing

Since Apr 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/slepic/templated-tracy-bar-panel)[ Packagist](https://packagist.org/packages/slepic/templated-tracy-bar-panel)[ RSS](/packages/slepic-templated-tracy-bar-panel/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (1)

[![Build Status](https://camo.githubusercontent.com/82b7e2860ddeb0dcd50a6c12bf6aaef74eafe123a078d8426f89abe94cc00469/68747470733a2f2f7472617669732d63692e6f72672f736c657069632f74656d706c617465642d74726163792d6261722d70616e656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/slepic/templated-tracy-bar-panel)[![Style Status](https://camo.githubusercontent.com/ff6bcf52bba4178d2512c521f7152c9a9c232e8e83853075689d5616e8a87205/68747470733a2f2f7374796c6563692e696f2f7265706f732f3138333838373131362f736869656c64)](https://styleci.io/repos/183887116)

templated-tracy-bar-panel
=========================

[](#templated-tracy-bar-panel)

A simple implementation of [`Tracy\IBarPanel`](https://github.com/nette/tracy/blob/master/src/Tracy/Bar/IBarPanel.php) that allows you to create custom panels by composition of two templates (for tab and panel respectively) and a data provider which feeds the templates with specific data.

The advantage of using [`TemplatedBarPanel`](https://github.com/slepic/templated-tracy-bar-panel/blob/master/src/TemplatedBarPanel.php) instead of implementing the IBarPanel interface directly are:

1. Implement just the [`TemplateDataProviderInterface`](https://github.com/slepic/templated-tracy-bar-panel/blob/master/src/TemplateDataProviderInterface.php) and use your favourite templating engine for tab and panel templates.
2. You abstract your implementation from a specific templating engine. Once you find a better/faster templating engine you can switch to it by just reimplementing the templates and not the way the data for them are gathered.
3. You allow your panels to change their look without having to modify them. You just pass different templates to them.

Requirements
------------

[](#requirements)

- PHP 5.6 or PHP 7.0
- [slepic/php-template](https://github.com/slepic/php-template) ([packagist](https://packagist.org/packages/slepic/php-template))

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

[](#installation)

Install with composer

`composer require slepic/templated-tracy-bar-panel`

Usage
-----

[](#usage)

When implementing a [`IBarPanel`](https://github.com/nette/tracy/blob/master/src/Tracy/Bar/IBarPanel.php) for Tracy, instead of implementing the interface directly, create just a factory class, which will instantiate the [`TemplatedBarPanel`](https://github.com/slepic/templated-tracy-bar-panel/blob/master/src/TemplatedBarPanel.php) like this:

```
class Factory
{
  /**
   * @param ...$dependencies Dependencies specific to your panel.
   * @return IBarPanel
   */
  public function create(...$dependencies)
  {
    return new TemplatedBarPanel(
      new MyTemplateDataProvider(...$dependencies),
      new OutputBufferTemplate(__DIR__ . '/tab.phtml'),
      new OutputBufferTemplate(__DIR__ . '/panel.phtml')
    );
  }
}

```

You need to implement the [`TemplateDataProviderInterface`](https://github.com/slepic/templated-tracy-bar-panel/blob/master/src/TemplateDataProviderInterface.php) to provide specific data for your templates.

The two templates can be the [`OutputBufferTemplate`](https://github.com/slepic/php-template/blob/master/src/OutputBufferTemplate.php) provided by the [slepic/php-template](https://packagist.org/packages/slepic/php-template) package.

But if you prefer a higher level template engine, see [slepic/php-template-implementation](https://packagist.org/providers/slepic/php-template-implementation) to see if there is an existing binding for your favourite templating engine.

Changelog
---------

[](#changelog)

### 0.2.0

[](#020)

- Update dependency slepic/php-template to v0.2.
- Changed return type of `TemplateDataProviderInterface::getTabData()` and `TemplateDataProviderInterface::getPanelData()` to array.
- Changed travis setup to only run tests in oldest and newest php versions supported by this package (that is 5.6 and 7.3).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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

Every ~396 days

Total

3

Last Release

1831d ago

PHP version history (2 changes)0.1.0PHP ^5.6 || ^7.0

0.2.1PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dd1cd12d4fe4974ad1e3609065ac4eb13c29023606c289c08153c432da827cf?d=identicon)[slepic](/maintainers/slepic)

---

Top Contributors

[![slepic](https://avatars.githubusercontent.com/u/8199404?v=4)](https://github.com/slepic "slepic (12 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/slepic-templated-tracy-bar-panel/health.svg)

```
[![Health](https://phpackages.com/badges/slepic-templated-tracy-bar-panel/health.svg)](https://phpackages.com/packages/slepic-templated-tracy-bar-panel)
```

###  Alternatives

[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388284.8k3](/packages/recca0120-laravel-tracy)[contributte/tracy

Nette Tracy extensions for easy-developing

141.5M5](/packages/contributte-tracy)[milo/vendor-versions

Bar with versions list of vendor libraries for Tracy

19159.2k5](/packages/milo-vendor-versions)[vasek-purchart/tracy-blue-screen-bundle

This bundle lets you use the Tracy's debug screen in combination with the the default profiler in your Symfony application.

1178.4k](/packages/vasek-purchart-tracy-blue-screen-bundle)[orisai/tracy-pets

Tracy got an angry pet to remind you of your failures

1026.3k4](/packages/orisai-tracy-pets)

PHPackages © 2026

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