Download the PHP package rnr1721/le7-links without Composer

On this page you can find all versions of the php package rnr1721/le7-links. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package le7-links

le7-links

PSR LinkInterface implementation for le7 MVC framework or any PHP8 PSR project This is not "clean" implementation, this is combination of EnvolvedLinkInterface, UriInterface and own ULinkInterface.

Requirements

Installation

Testing

Usage

Link

The Link class represents a LinkInterface, UriInterface and own ULinkInterface with additional functionality for manipulating URIs and rendering HTML anchor tags.

First, import the Link class:

Create an instance of the Link class by providing the URI, link relation types, and additional attributes:

Retrieving URI Components

You can retrieve different components of the URI using the following methods:

Modifying URI Components

You can create a modified version of the link by using the following methods:

Rendering HTML Anchor Tags

To render the link as an HTML anchor tag, use the render method:

The render method returns a string containing the HTML anchor tag.

Link Attributes

You can retrieve and modify the link's relation types and additional attributes using the following methods:

You can create a modified version of the link with updated relation types and attributes using the following methods:

String Conversion

You can obtain the string representation of the link using the magic __toString method:

LinkProvider

The LinkProvider class is an implementation of the EvolvableLinkProviderInterface from the PSR-Link library. It is used to store and manage links.

First, import the LinkProvider class:

Create an instance of the LinkProvider class:

Adding Links

To add a link to the provider, use the withLink method:

You can chain multiple withLink calls to add multiple links:

Retrieving Links

To retrieve all the links in the provider, use the getLinks method:

The getLinks method returns an array of LinkInterface objects.

Removing Links

To remove a link from the provider, use the withoutLink method:

Filtering Links

To retrieve links based on their relationship, use the getLinksByRel method:

The getLinksByRel method returns an array of LinkInterface objects that have the specified relationship.

Adding Multiple Links

To add multiple links at once, use the withLinks method:

Removing Multiple Links

To remove multiple links at once, use the withoutLinks method:

The withoutLinks method takes an array of LinkInterface objects and removes them from the provider.


All versions of le7-links with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
psr/link Version ^2.0
psr/http-message Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rnr1721/le7-links contains the following files

Loading the files please wait ...