Download the PHP package soflomo/common without Composer

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

Soflomo\Common

Soflomo\Common is a small utility module with a few helper classes. Its purpose is to provide some plugin/helper classes to provide functionalities common for many different projects.

At this moment, it provides the following classes:

Installation

Soflomo\Common is available through composer. Add "soflomo/common" to your composer.json list. During development of Soflomo\Common, you can specify the latest available version:

Enable the module in your config/application.config.php file. Add an entry Soflomo\Common to the list of enabled modules.

Usage

Example of usage is listed below for every single helper class.

Accept controller plugin

Say you perform a delete request to the uri /books/123. An AJAX request might expect a 200 OK with a body message, while for a normal request you want to redirect to /books again.

Attachment controller plugin

You have created a pdf file and you want to let the user download that file.

Available methods are fromFile($path, $name=null, $type=null, $disposition=null) and fromBlob($blob, $name, $type=null, $disposition=null). A fromStream() method is not implemented yet, but is planned in a future version.

Version view helper

For all styles, images and javascript files, a new deployed version might be changed but is available under the same URI. You want to force a reload as a cache busting mechanism, but you do not want to update the version manually each time.

This view helper loads a version description from git with git describe --always. For a tag it will return the tag (e.g. v.1.0.4). If no tag is checked out (for example, on your staging environment) it loads a mixed version (e.g. v1.0.4-14-g2414721 or when nothing has been tagged g2414721). The version can be appended as query string: css/style.css?v1.0.4:


All versions of common with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3.
zendframework/zendframework Version 2.*
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 soflomo/common contains the following files

Loading the files please wait ....