Download the PHP package asika/autolink without Composer

On this page you can find all versions of the php package asika/autolink. 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 autolink

PHP Autolink Library

GitHub Actions Workflow Status Packagist Version Packagist Downloads

A library to auto convert URLs to links.

Table of Content

Requirement

Installation via Composer

Add this to composer.json require block.

Getting Started

This is a quick start to convert URL to link:

Use Autolink Object

Create the object:

Create with options.

Convert Text

This is an example text:

We convert all URLs.

Output:

Add Attributes

All link will add this attributes:

Convert Email

Email url has no scheme, we use anoter method to convert them, and it will add mailto: at begin of href.

Output

Attributes Escaping

As htmlspecialchars() in PHP 8.1 or higher will escape single quote as default, Autolink will also escape single quote even in 8.0. Use this method to keep all escape behavior same at any PHP versions:

If you want to change the escape behavior, set your custom escape handler:

Options

text_limit

We can set this option by constructor or setter:

The link text will be:

Use Your own limit handler by set a callback:

Or use \Asika\Autolink\LinkHelper::shorten() Pretty handler:

Output:

auto_title

Use AutoTitle to force add title on anchor element.

Output:

strip_scheme

Strip Scheme on link text:

Output

escape

Auto escape URL, default is true:

Output

link_no_scheme

Convert URL which no scheme. If you pass TRUE to this option, Autolink will use http as default scheme, you can also provide your own default scheme.

Output

Scheme

You can add new scheme to convert URL begin with it, for example: vnc://example.com

Default schemes is http, https, ftp, ftps.

Link Builder

If you don't want to use <a> element as your link, you can set a callback to build link HTML.


All versions of autolink with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 asika/autolink contains the following files

Loading the files please wait ....