Download the PHP package istranger/yii-resource-smart-load without Composer

On this page you can find all versions of the php package istranger/yii-resource-smart-load. 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 yii-resource-smart-load

Extension to prevent reloading scripts (on AJAX request)

This extension for yii 1.1.x prevent reload resources (on AJAX request), which already exist on client.

Requirements

Features

Limitations

Installation

Usage

Typical use case

By default, this extension disables reloading of all matched resources (js/css files and inline blocks). That is, each resource on the page will be loaded only once, even if it will later be removed from this page. Therefore, all JS callbacks on first load should be bind to the global containers (for example, document) using jQuery-method .on(). At the subsequent AJAX requests already loaded CSS inline blocks (or CSS files) may be replaced by new content, therefore, in case you have problems with CSS styles is recommended to set option:

Advanced use case

For the analysis of disabled/loaded scripts is convenient to use an option enableLog, that output useful debug information in browser console:

You can more flexible manage resource loading on certain pages using methods:

These methods can be invoked in any actions. The argument $types is an array of resource types, that can be defined using constants:

In addition, you can set activateOnAllPages = false, and extension will be disabled on all pages. You will need to manually configure disabling of resources on certain pages (with the help of these methods).

Alternatively, you can configure exclusion list of resources:

These resources always will be loaded on client. Each resource can be presented:

The hash of specific resource can be get through browser console in the global object of extension (enableLog == true). For example:

Similar extensions

To prevent reloading scripts you can use nlsclientscript

However, there are a few differences:

Change Log

v0.2-beta (2015-02-08)

v0.1-beta (2015-02-04)


All versions of yii-resource-smart-load with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.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 istranger/yii-resource-smart-load contains the following files

Loading the files please wait ...