Download the PHP package em4nl/unplug without Composer

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

Unplug

WordPress microframework

Installation

Via composer:

Usage

Unplug is a microframework for use in a WordPress theme when you need more control over the frontend of your website than WordPress gives you by default. It's highly recommended to use it together with the Twig template engine.

The basic idea is to bypass WordPress' routing/template hierarchy mechanisms completely and roll our own.

I assume you're using autoloading and your composer vendor dir is at ./vendor.

functions.php

To make sure WordPress doesn't run its default query/template, you'll need to add a call to Em4nl\Unplug\unplug in your theme's functions.php.

index.php

For most themes, this will probably be the only other PHP file you'll need (especially if using Twig).

index.php (WordPress root) (CACHING!)

While you can just use Unplug's caching from inside your theme, the most efficient way is to circumvent WordPress completely and only load it when we can't or don't want to serve a page from cache. In order to do so, you'll need to replace WP's root index.php file with your own.

Rename index.php---the one at the root of your WordPress installation, not the one in your theme, to something else, like wp-index.php.

Then create a new index.php file in its place and put the following code in it:

This will serve files from the cache and only load WordPress if a file isn't found or invalidated by a custom function given through the optional `invalidate** parameter.

Read on, you need that file, too

unplug-config.php

While it won't hurt to have this file if you're not using the custom front controller, you need to have it if you do. You can put this in the WordPres root next to the index.php or in any other directory really as long as it's above the vendor dir where you installed unplug.

At the moment, you'll need to have these two definitions in there:

Development

Install dependencies

Run tests

License

The MIT License


All versions of unplug with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
em4nl/urouter Version ^0.0.4
em4nl/ucache Version ^0.0.4
em4nl/uresponse Version ^0.0.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 em4nl/unplug contains the following files

Loading the files please wait ....