Download the PHP package gufy/assets-services without Composer

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

Build Status

Silex Assets Manager

A simple and useful assets manager.

Installation

Because Silex is using composer as its dependency manager, so does this Assets Manager. just provide this line on your composer.json

{
    ...
    "require":{
        ...
        "gufy/assets-service":"dev-master"
        ...
    }
    ...
}

Or refer to https://packagist.org/packages/gufy/assets-services for more detailed available versions

It is a simple and useful assets manager for silex. All you need to do is simple, to register some files before anything else just register the service provider and provide some parameters within it. For example:

Available Options

When you register this provider, there are some configurations that you can provide on it. Here is the configuration options

<?php
array(
    'assets.options'=>array(
        'baseUrl'=>'... your base url ...',// base url will prepend to all of the assets, i.e if you provide baseUrl with 'http://localhost' and you have javascript file 'js/app.js' then, it will output as http://localhost/js/app.js
        // if you consider about combine and compress your assets, please provide this.
        'combine'=>true, // set assets manager in combine mode
        'basePath'=>'', // base directory path of your assets
        'scriptPath'=>'', // set this variable with directory root of your webapp
        'cachePath'=>'', // directory who handle your cached assets files
        'cacheFileName'=>'', // custom file name of the cache file, leave blank or remove it and it will generated random string

    ), 
);

Or if you prefer setting it up on the fly or in the specific response only, you can use this

<?php
$app['assets']->setOption('optionName','...value...');
// example
$app['assets']->setOption('baseUrl','http://localhost/hello-world/');

Add single assets

If you want to add files on the controller or specific response only, you can do like this.

<?php
$app->get('/',function(Request $request) use($app){

    // for javascript file
    $app['assets']->registerJs('... your file name ...');

    // for css file     
    $app['assets']->registerCss('... your file name ...');
    return "something";
});

Add custom Style or Javascript on the fly

If you want to add custom style or javascript on the fly, use this.

<?php
$app->get('/',function(Request $request) use($app){

    // for javascript file
    $app['assets']->customJs('... $id ..','... $scripts ...');

    // for css file     
    $app['assets']->customCss('... $styles ...');
    return "something";
});

Reset the whole assets

For reset by type, simply use this function

<?php
// reset javascript files 
$app['assets']->reset('js');

// reset css files
$app['assets']->reset('css');

Or if you wanna reset the whole assets, it's simple use this.

<?php
// reset the whole files
$app['assets']->reset();

Contribution

If you want to contribute on this repo, just fork this repo or give me some feedback from the issue feature.


All versions of assets-services 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 gufy/assets-services contains the following files

Loading the files please wait ....