PHPackages                             jlaso/jaitec-alias - 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. jlaso/jaitec-alias

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

jlaso/jaitec-alias
==================

A simple alias generator

18PHP

Since Oct 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jlaso/JaitecAliasBundle)[ Packagist](https://packagist.org/packages/jlaso/jaitec-alias)[ RSS](/packages/jlaso-jaitec-alias/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

JaitecAliasBundle
=================

[](#jaitecaliasbundle)

This bundle provides helpers to generate pseudo-random alias.

[![SensioLabsInsight](https://camo.githubusercontent.com/299ffc58c26685cf244403d67cb80ef9cb7041ee9a6f34239181dabd4016cefd/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f36353361343866312d323665622d343330652d393663322d3462303739616436653534642f6269672e706e67)](https://insight.sensiolabs.com/projects/653a48f1-26eb-430e-96c2-4b079ad6e54d)

Installation
============

[](#installation)

Add AliasBundle to your vendor/bundles/ dir
-------------------------------------------

[](#add-aliasbundle-to-your-vendorbundles-dir)

::

```
$ git submodule add git://github.com/jlaso/JaitecAliasBundle.git vendor/bundles/Jaitec/AliasBundle

```

or add this to deps

```
[JaitecAliasBundle]
    git=http://github.com/jlaso/JaitecAliasBundle
    target=/bundles/Jaitec/AliasBundle

```

and run

```
$ php bin/vendors install

```

Add the Jaitec namespace to your autoloader
-------------------------------------------

[](#add-the-jaitec-namespace-to-your-autoloader)

::

```
// app/autoload.php
$loader->registerNamespaces(array(
    'Jaitec' => __DIR__.'/../vendor/bundles',
    // your other namespaces
);

```

Add AliasBundle to your application kernel
------------------------------------------

[](#add-aliasbundle-to-your-application-kernel)

::

```
// app/AppKernel.php

public function registerBundles()
{
    return array(
        // ...
        new Jaitec\AliasBundle\JaitecAliasBundle(),
        // ...
    );
}

```

Usage
=====

[](#usage)

AliasBundle provides this service to generate pseudo-random alias :

- `jaitec_alias.main` implements `AliasGeneratorInterface`

Instead of those specialized services, you can also inject `jaitec_alias.main`, which provides shortcuts to all of the other services and allow you to only inject a single dependancy.

Sample
======

[](#sample)

For example generating alias for an url based on row ID in mysql table

First get the object throught dependency inject

```
$this->alias = $this->container->get('jaitec_alias.main');

```

Now generate the alias

```
$alias = $this->alias->encode($record->getId(),4);

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

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/6f19216fd9d91bd7cfff14362e2ddb5728bd2d8f50d2e0174626fc61510ed33b?d=identicon)[jlaso](/maintainers/jlaso)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/jlaso-jaitec-alias/health.svg)

```
[![Health](https://phpackages.com/badges/jlaso-jaitec-alias/health.svg)](https://phpackages.com/packages/jlaso-jaitec-alias)
```

###  Alternatives

[tractorcow/silverstripe-autocomplete

Autocomplete text field for Silverstripe

35364.2k6](/packages/tractorcow-silverstripe-autocomplete)[squareetlabs/laravel-openvidu

Laravel client for controlling your videocalls from your Openvidu server.

2810.8k](/packages/squareetlabs-laravel-openvidu)

PHPackages © 2026

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