Download the PHP package javiereguiluz/easyslugger without Composer

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

EasySlugger

Build Status SensioLabsInsight

EasySlugger is a fast PHP library to generate slugs, which allow to safely include any string as part of an URL. Slugs are commonly used for CMS, blogs and other content-related platforms.

Installation

Add this library as a dependency of your project using Composer:

Generating slugs

Most slugger libraries include a lot of settings to configure how the slugs are generated. EasySlugger uses a different approach to provide both a great performance and flexibility: it includes four different slugger classes!

All sluggers implement the SluggerInterface, which allows you to safely switch from one slugger to another in your projects.

Generating basic slugs

The easiest way to generate slugs is to use the slugify() method of the Slugger class:

You can also instantiate the Slugger class to use it non-statically:

Generating unique slugs

If you need to ensure the uniqueness of the slugs generated during the execution of your application, use the uniqueSlugify() method, which appends a random suffix to the slug:

Unique slugs are non-deterministic, meaning that the appended suffix is random and it will change in each application execution, even when using the same input string. If you want to append an autoincremental numeric suffix to the slugs, you'll need to develop your own custom solution.

Generating slugs for non-latin alphabets

If the strings contain characters belonging to non-latin alphabets such as Arabic, Hebrew and Japanese, you should use the Utf8Slugger class. This slugger requires PHP 5.4.0 or higher because it uses the built-in PHP transliterator:

Utf8Slugger also defines the uniqueSlugify() to generate unique slugs.

Generating SEO slugs

The SeoSlugger (and the related SeoUtf8Slugger) augments the strings before turning them into slugs. The conversions are related to numbers, currencies, email addresses and other common symbols:

SeoSlugger and SeoUtf8Slugger also define the uniqueSlugify() to generate unique slugs.

Configuration options

The only configuration option available is the separator character (or string) used to separate each of the slug parts. First, you can set this parameter globally using the class constructor:

You can also set this parameter as the second optional argument of the slugify() and uniqueSlugify() methods. This parameter always overrides any global parameter set by the class:

License

This library is licensed under the MIT license.

Tests

The library is fully unit tested. If you have PHPUnit installed, execute phpunit command to run the complete test suite:


All versions of easyslugger with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 javiereguiluz/easyslugger contains the following files

Loading the files please wait ....