Download the PHP package namshi/utility-bundle without Composer

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

NAMSHI | UtilityBundle

This bundle provides some basic, silly utilities that we use across our Symfony2 applications.

Installation

The bundle can be easily installed via composer ("namshi/utility-bundle": "dev-master").

More informations available on Packagist.

Then enable it in the AppKernel.php:

Doctrine CommaSeparatedList type

If you want to persist an array into the DB as a list of comma-separated strings (ie. to be able to execute FIND_IN_SET) you can simply use the Namshi\UtilityBundle\ORM\Type\CommaSeparatedList type.

Remember to register it inside Symfony2's config.yml:

and then use it on your entities:

File serving with authentication

One of the utilities that you can take advantage of is file serving, mixing it with authentication.

Suppose you have a file, protected.txt, in /path/to/symfony2/data/protected.txt and you want only some users to be able to access it.

You just have to enable a route that tells the bundle which file to serve:

and define the file path in the parameters.yml:

At that point you will be able to access the content of the file (it uses file_get_contents(), so don't try using this utility as a download manager).

How to restrict access to the file then? Simply use the built-in ACL system that you have in Symfony2: configure your security.yml for the path ^/protected.txt and you're done.

Currency conversion

Totally unrelated to Symfony2, but included here for (our) conveniency, there is a currency converter that accepts conversion rates and can be used to easily convert an amount from a currency to another one.


All versions of utility-bundle with dependencies

PHP Build Version
Package Version
No informations.
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 namshi/utility-bundle contains the following files

Loading the files please wait ....