Download the PHP package acelaya/zf2-acassets without Composer

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

AcAssets

Build Status Latest Stable Version Total Downloads License

This module can be used to define assets (CSS / JS) in configuration files instead of defining them directly in a layout, injecting defined scripts and stylesheets in InlineScript, HeadScript and HeadLink.

This allows to take advantage of Zend Framework's configuration system, overriding global configurations with local configuration or even defining different configurations for each environment. Take a look at this advanced configuration tricks.

It only works with existing assets in public directory. It does not minify or concatenate assets. For this purpose, please look at other modules like AssetsManager or zf2-assetic-module.

Installation

Install composer in your project.

Define dependencies in your composer.json file

Install dependencies

After installing the module, copy vendor/acelaya/zf2-acassets/config/assets.global.php.dist to config/autoload/assets.global.php. This will provide an empty configuration file that will be explained later.

Finally enable the module in your application.config.php file.

Usage

This module is very easy to use. You only need to setup your assets configuration. If the module is enabled it will inject all configured asstes automatically at DISPATCH and DIPATCH_ERROR.

Then, you only need to print the headScript, inlineScript and headLink in your layout or view. They will be fully configured.

If there is some configuration you need to do that is not supported by this module, you can already append other files and stylesheets to any element in a regular way.

Configuration

An example of a configuration file could be this.

The css block wraps the stylesheets that will be included in the headLink element. The nested path is used to define a base path that will be prepended to each defined stylesheet. It will be "/" if not defined.

The stylsheets block is an array with all the stylsheets that need to be injected. It is an associative array to allow configuration overriding, but the key is just orientative. Each value has a name property, which is the filename relative to the path property. It can have an optional media property.

The js block wraps the files that will be included in headScript and inlineScript. It also has a nested path with the basepath of the scripts.

Both inline and head are associative arrays with the files that should be injected in the layout. As in stylesheets, the name property is the filename relative to path. It also has an options property which is the third param used when calling the method appendFile.

The scripts and stylesheets are appended in the order they are defined in css/stylesheets, js/inline and js/head, but a priority property can be defined in any of them to set the order in which they should be appended. It's 1 by default.

TODO

Look at the issues page to know what is planned to be included in the module.


All versions of zf2-acassets with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
zendframework/zendframework Version >=2.2.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 acelaya/zf2-acassets contains the following files

Loading the files please wait ....