PHPackages                             effectra/link - 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. effectra/link

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

effectra/link
=============

The Effectra Link package.

v1.0.0(3y ago)11.2k↑240%1MITPHP

Since Jun 19Pushed 3y agoCompare

[ Source](https://github.com/effectra/link)[ Packagist](https://packagist.org/packages/effectra/link)[ RSS](/packages/effectra-link/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Effectra/Link
=============

[](#effectralink)

Effectra\\Link is a PHP library that provides implementations of various PSR link interfaces. It offers classes such as Link, EvolvableLink, and LinkProvider, which enable you to work with hypermedia links, manage evolvable links, and retrieve links for your applications.

Features
--------

[](#features)

- Create and manipulate hypermedia links
- Manage evolvable links
- Retrieve links by relation
- Generate HTML string with links

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

[](#requirements)

- PHP 7.4 or higher

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

[](#installation)

You can install the Effectra\\Link package via Composer. Simply run the following command:

```
composer require effectra/link
```

Usage
-----

[](#usage)

### Creating a Link

[](#creating-a-link)

```
use Effectra\Link\Link;

$link = new Link('http://example.com', false, ['rel' => 'self'], ['title' => 'Example Link']);
```

### Manipulating a Link

[](#manipulating-a-link)

```
// Add a relation to the link
$link = $link->withRel('next');

// Remove a relation from the link
$link = $link->withoutRel('self');

// Add an attribute to the link
$link = $link->withAttribute('class', 'link-class');

// Remove an attribute from the link
$link = $link->withoutAttribute('title');
```

### Retrieving Links

[](#retrieving-links)

```
use Effectra\Link\LinkProvider;

$link1 = new Link('http://example.com', false, ['rel' => 'self']);
$link2 = new Link('http://example.com/posts', false, ['rel' => 'collection']);

$links = [$link1, $link2];

$linkProvider = new LinkProvider($links, []);

$allLinks = $linkProvider->getLinks(); // Returns an array of LinkInterface objects

$collectionLinks = $linkProvider->getLinksByRel('collection'); // Returns an array of EvolvableLinkInterface objects with the 'collection' relation
```

### Generating HTML with Links

[](#generating-html-with-links)

```
$html = $linkProvider->withHTML($links); // Generates an HTML string with links
```

For more information and advanced usage, please refer to the documentation.

Contributing
------------

[](#contributing)

Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue on the GitHub repository.

License
-------

[](#license)

Effectra\\Link is open-source software licensed under the MIT license. See the [LICENSE](LICENSE) file for more information.

```

Feel free to customize the content to fit your specific needs.

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

1111d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e6219ae87e98df8783b2f595b013035dd183c0712afd24045a8acf0a40c3bdf?d=identicon)[effectra](/maintainers/effectra)

---

Top Contributors

[![BMTmohammedtaha](https://avatars.githubusercontent.com/u/95439605?v=4)](https://github.com/BMTmohammedtaha "BMTmohammedtaha (8 commits)")

---

Tags

hyperlinklinkphppsrpsr-13

### Embed Badge

![Health badge](/badges/effectra-link/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/web-link

Manages links between resources

1.4k106.9M361](/packages/symfony-web-link)[justbetter/laravel-http3earlyhints

A HTTP3 Early Hints Middleware for Laravel

1977.0k4](/packages/justbetter-laravel-http3earlyhints)

PHPackages © 2026

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