Download the PHP package ssnepenthe/metis without Composer

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

metis

Pimple, with some some helpful tweaks for working in WordPress.

Requirements

PHP 5.3 or later and Composer.

Note: Metis should continue to work down to 5.3 but is no longer tested below 5.4.

Installation

Usage

This is basically Pimple but you will use Metis\Container instead of Pimple\Container.

The following features have been added:

Handle activation and deactivation logic within your service providers

And then call the corresponsing method on your container instance.

Handle boot logic (add_action/add_filter calls) within your service providers

And then call the corresponding method on your container instance.

Service Proxies

One of the many benefits of a dependency injection container like Pimple is that objects are created on demand as you access their container entries.

This can be especially useful for functionality that is only needed on a limited number of requests (e.g. admin, cron, etc.).

Unfortunately this doesn't always work the way you might want in WordPress:

Since the boot() method is typically attached to the plugins_loaded hook, the admin page object will always be created regardless of whether admin_init has been triggered.

A sensible approach would be to verify that the current request is for an admin page before calling add_action():

But this results in a boot method littered with conditionals.

An alternative would be to access the admin_page entry within an anonymous function:

But that gets tedious quickly and can result in a large number of unnecessary Closure objects floating around.

Instead, you might choose to extend Metis\Base_Provider and use the proxy() method:

This will create a Metis\Proxy object to be used in place of the admin page object. This object will correctly proxy all method calls to the underlying service from the container while holding off on creation of that service until it is actually needed.

Access WordPress globals from the container

Use the WordPress_Provider class to get access to frequently used WordPress globals from the container.

$wp, $wpdb, $wp_query, $wp_rewrite, $wp_filesystem and $wp_object_cache are all added to the container.

Be careful about timing when using these - each will return null if it has not yet been defined.


All versions of metis with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
pimple/pimple Version ^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 ssnepenthe/metis contains the following files

Loading the files please wait ....