Download the PHP package elefant/app-cloudfront without Composer

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

CloudFront

This is a ridiculously simple app to help integrate an Elefant website with the Amazon CloudFront content distribution network (CDN).

Setup

1. Sign up for an AWS account and add CloudFront to your services in the AWS Management Console.

2. Still in the AWS Management Console, go to CloudFront and click the Create Distribution button. Choose the following options in the Create Distribution Wizard:

Be sure to change www.example.com to match your website's domain name.

You can find more information about the other settings here. Now click Continue.

Create Distribution Wizard

3. Optional Under Distribution Details, choose a subdomain like cdn.example.com and enter it into the CNAMEs field. We'll be pointing this CNAME to CloudFront in our DNS settings in a later step. For more info on the other settings, click here.

Distribution Details

4. Optional Once you've created your CloudFront distribution, copy the domain name shown in the Domain Name tab. Log into your registrar and add a CNAME to your DNS as follows:

5. Copy the cloudfront app into your Elefant install's apps folder, then visit Extras > CloudFront in the Elefant admin toolbar and enter the Amazon AWS CDN domain name (from step 3) into the domain field.

If you decided not to use a CNAME and skipped steps 3 and 4, simply copy the domain under the Domain Name tab for your newly created CloudFront distribution and use that instead.

Usage

In your views and layouts, any files you want to serve through CloudFront should be changed to look like this:

The file path is simply wrapped in {! !} tags (the single spaces are optional and are ignored), and the file path gets cloudfront added to it. This passes the file path to the CloudFront app's main handler to be rewritten as a CloudFront reference.

You can also call it directly via PHP like this:

Alternately, you can simply refer to the same file paths directly on the CDN like this:

This is more direct and eliminates the extra handler call. The dynamic handler does do some extra checking of the validity of the requested file, which can be useful for dynamic requests where the file name is not known ahead of time, at the expense of being slightly less optimized. So where possible, use a direct URL, and where the file requested is dynamic, it may be better to use the handler.

Gzip compression

CloudFront doesn't automatically gzip files on its own, but you can add a few lines to your server configuration to ensure that it correctly sends gzipped files whenever possible. Here is a brief configuration for Nginx users that will tell CloudFront to serve correctly gzipped files:


All versions of app-cloudfront with dependencies

PHP Build Version
Package Version
Requires elefant/app-installer Version *
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 elefant/app-cloudfront contains the following files

Loading the files please wait ....