Download the PHP package admad/cakephp-glide without Composer

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

CakePHP Glide

Build Status Coverage Status Total Downloads

CakePHP plugin to help using Glide image manipulation library.

The plugin consists of a middlware, view helper and a Glide response class.

Installation

Install the plugin through composer:

Load the plugin using CLI:

Usage

Middleware

In your config/routes.php setup the GlideMiddleware for required scope which intercepts requests and serves images generated by Glide. For e.g.:

For the example config shown above, for URL like domain.com/images/user/profile.jpg the source image should be under webroot/uploads/user/profile.jpg.

Note: Make sure the image URL does not directly map to image under webroot. Otherwise as per CakePHP's default URL rewriting rules the image will be served by webserver itself and request won't reach your CakePHP app.

Exceptions

If you have enabled secure URLs and a valid token is not present in query string the middleware will throw a ADmad\Glide\Exception\SignatureException exception.

If a response image could not be generated by the Glide library then by default the middleware will throw a ADmad\Glide\Exception\ResponseException. A Glide.response_failure event will also be triggered in this case. You can setup a listener for this event and return a response instance from it. In this case that response will be sent to client and ResponseException will not be thrown.

Helper

The provided GlideHelper helps creating URLs and image tags for generating images. You can load the helper in your AppView::initialize() as shown in example below:

Here are the available methods of GlideHelper:

The main benefit of using this helper is depending on the value of secureUrls config, the generated URLs will contain a token which will be verified by the middleware. The prevents modification of query string params.


All versions of cakephp-glide with dependencies

PHP Build Version
Package Version
Requires cakephp/cakephp Version ^5.0
league/glide Version ^2.3
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 admad/cakephp-glide contains the following files

Loading the files please wait ....