Download the PHP package fabstei/shorturl-bundle without Composer

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

Provides short urls for your Symfony2 Project.

SensioLabsInsight

Build Status

Note: This bundle is under development. Things will change and might break. Feedback is very welcome!

About

This Bundle allows you to

The bundle is based on the shorturl class by Jonathan Snook.

Installation

Using Composer, add to composer.json:

{
    "require": {
        "fabstei/shorturl-bundle": "0.2.0"
    }
}

Then install/update your vendors:

php composer.phar update

Add the bundle to your AppKernel.php:

new Fabstei\ShorturlBundle\FabsteiShorturlBundle(),

Update your doctrine database schema (doctrine:schema:update --force)

Import the routes from your routing.yml:

# Redirection from short to long urls
redirect:
    resource: "@FabsteiShorturlBundle/Resources/config/routing/redirect.yml"
    #hostname_pattern: example.com
    #prefix: /shorturls

# Shorturl management
shorturl:
    resource: "@FabsteiShorturlBundle/Resources/config/routing/url.yml"

The optional hostname pattern (new in Symfony 2.2) allows you to use a seperate domain for your short urls.

Configuration

The bundle provides sensible default values but one might want to customize the codeset used to generate unique tokens (used as short urls).

fabstei_shorturl:
    codeset: abcABC123-_! # Default: abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789

Usage

The bundle comes with two services:

It also provides a controller to handle redirections as well as a controller, views and forms to manage the redirections (by default accessible from /url-manager). Custom shorturls can be used to replace the default tokens (calculated from the redirection id). Furthermore, you may use _locale anywhere in the long urls you store, which is replaced by the current requests locale on redirection.

Both services are also accessible via cli commands:

php app/console fabstei:shorturl:add    # Add a long url, returns the short token
php app/console fabstei:shorturl:get    # Retrieve a long url associated with a token
php app/console fabstei:shorturl:update # Update the long url associated with a token
php app/console fabstei:shorturl:remove # Remove a redirection
php app/console fabstei:shorturl:list   # Get a list of all stored redirections

php app/console fabstei:token:codeset   # Get the codeset used to generate tokens
php app/console fabstei:token:encode    # Calculate a token from an integer
php app/console fabstei:token:decode    # Calculate the integer from a given token

TODO

Dependencies

Credits


All versions of shorturl-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
symfony/symfony Version >=2.1.0
doctrine/orm Version >=2.1.0
symfony/framework-bundle Version 2.*
gedmo/doctrine-extensions Version >=2.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 fabstei/shorturl-bundle contains the following files

Loading the files please wait ....