PHPackages                             uestla/aliaser - 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. uestla/aliaser

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

uestla/aliaser
==============

Simple PHP library for parsing and handling class aliases defined by USE statements.

1.1.0(12y ago)3606MITPHPPHP &gt;=5.3.0

Since Jun 30Pushed 11y ago2 watchersCompare

[ Source](https://github.com/uestla/Aliaser)[ Packagist](https://packagist.org/packages/uestla/aliaser)[ Docs](https://github.com/uestla/Aliaser)[ RSS](/packages/uestla-aliaser/feed)WikiDiscussions master Synced 1mo ago

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

Aliaser
=======

[](#aliaser)

Simple PHP library for parsing and handling class and function aliases defined by `USE` statements.

Usage
-----

[](#usage)

**Book.php**

Here we have an entity class `Book` with some annotations:

```
namespace Model\Entities;

use \DateTime;

/**
 * @property User $author
 * @property DateTime $written
 */
class Book
{}

function foo()
{}
```

**foo.php**

And now let's say we would like to take those annotations and get the full class name of those `@property` types defined. And that's where we'll use `Aliaser`:

```
$reflection = new ReflectionClass('Model\Entities\Book');

Aliaser\Container::getClass('User', $reflection); // 'Model\Entities\User'
Aliaser\Container::getClass('DateTime', $reflection); // 'DateTime'
```

We can discover full function/callback name according to given namespace context as well.

```
Aliaser\Container::getCallback('DateTime::format', $reflection); // 'DateTime::format'
Aliaser\Container::getCallback('User::getName', $reflection); // 'Model\Entities\User::getName'

Aliaser\Container::getCallback('foo', $reflection); // 'Model\Entities\foo'
```

It handles multiple namespace definitions in a single file as well.

However, parsing can be quite expensive - we can use a [Nette Framework](http://doc.nette.org/en/caching) Cache:

```
$storage = new Nette\Caching\Storages\FileStorage(__DIR__ . '/temp');
Aliaser\Container::setCacheStorage($storage);

// ...
```

Enjoy.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

7

Last Release

4650d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d3a756def83a4d23274f1b7c7854f6eda71834901be89fc668f85f170f97653?d=identicon)[uestla](/maintainers/uestla)

---

Top Contributors

[![uestla](https://avatars.githubusercontent.com/u/373888?v=4)](https://github.com/uestla "uestla (18 commits)")

---

Tags

phpnamespace

### Embed Badge

![Health badge](/badges/uestla-aliaser/health.svg)

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

###  Alternatives

[nikic/phlexy

Lexing experiments in PHP

162570.9k13](/packages/nikic-phlexy)[corveda/php-sandbox

A PHP library that can be used to run PHP code in a sandboxed environment

23483.5k2](/packages/corveda-php-sandbox)[blancks/fast-jsonpatch-php

Class designed to efficiently handle JSON Patch operations in accordance with the RFC 6902 specification

396.4k](/packages/blancks-fast-jsonpatch-php)[bupy7/xml-constructor

The array-like constructor of XML document structure.

1337.9k](/packages/bupy7-xml-constructor)

PHPackages © 2026

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