PHPackages                             whitestone/xpl - 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. whitestone/xpl

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

whitestone/xpl
==============

Whitestone eXtended PHP Library

1.0.2(6y ago)03MITPHPPHP ^7.0CI failing

Since Oct 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/niko-whitestone/xpl)[ Packagist](https://packagist.org/packages/whitestone/xpl)[ RSS](/packages/whitestone-xpl/feed)WikiDiscussions master Synced 3d ago

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

Whitestone Oy - eXtended PHP Library
====================================

[](#whitestone-oy---extended-php-library)

[![Whitestone Oy](https://camo.githubusercontent.com/bd6d68fe47da5d0bf76bbf7586f297f51fe71966b12e33a1da6eb867bff9c750/68747470733a2f2f7777772e776869746573746f6e652e66692f77736c6f676f2e706e67)](https://camo.githubusercontent.com/bd6d68fe47da5d0bf76bbf7586f297f51fe71966b12e33a1da6eb867bff9c750/68747470733a2f2f7777772e776869746573746f6e652e66692f77736c6f676f2e706e67)

Whitestone\\Xpl contains some helper traits and classes for PHP7+. License: MIT

Installing &amp; requirements
-----------------------------

[](#installing--requirements)

Requirements:

- PHP 7

You can install Xpl using `composer`:

```
composer require whitestone\xpl

```

Running tests
-------------

[](#running-tests)

Use `phpunit` or `composer run test` to run PHPUnit.

`trait Whitestone\Xpl\Runkit`
-----------------------------

[](#trait-whitestonexplrunkit)

Contains single method for running closures in class context with simple parameter passthru.

Example 1a (Foo.php)

```
class Foo {
    use Whitestone\Xpl\Runkit;

    public function print($x)
    {
        echo "{$x}\n";
    }
}
```

Example 1b (index.php)

```
$foo = new Foo;
$foo->with(function($time) {
    $this->print($time);
    $this->print('OK');
}, time());
```

Expected output 1

```
1572350237\n
OK\n
```

`trait Whitestone\Xpl\Pathkit`
------------------------------

[](#trait-whitestonexplpathkit)

Helper for detecting current file location inside class context.

Example 1a (Bar.php)

```
abstract class Bar {
    use Pathkit;

    public function add()
    {
        $filePath = $this->myFilename();
        error_log("Deprecated method Bar->add() called in '{$filePath}'!");
    }
}
```

Example 1b (Foobar.php)

```
class FooBar extends Bar
{

}
```

Expected output 1

```
Deprecated method Bar->add() called in '.*/Foobar.php'
```

`trait Whitestone\Xpl\Renderer`
-------------------------------

[](#trait-whitestonexplrenderer)

Helper for rendering files with output buffering on current scope (without overflowing variables)

Example 1a (View.php):

```
class View {
    use Renderer;
}
```

Example 1b (template.phtml)

```
\n

```

Example 1c (index.php)

```
$view = new View;
echo $view->scopedRender('template.phtml', ['foo' => 'bar']);
```

Expected output 1

```
bar\n
View
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~2 days

Total

3

Last Release

2390d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c8cc88bd74668b519f7e8b848f9ee12efbbcf483da327e9e3bf576e1e2e61f8?d=identicon)[whitestone-niko](/maintainers/whitestone-niko)

---

Top Contributors

[![niko-whitestone](https://avatars.githubusercontent.com/u/57001662?v=4)](https://github.com/niko-whitestone "niko-whitestone (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/whitestone-xpl/health.svg)

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

PHPackages © 2026

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