Download the PHP package nathanburkett/ecosystem without Composer

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

NathanBurkett/Ecosystem

Latest Version on Packagist

Ecosystem is a simple and smart environment manager for your user-facing scripts and stylesheets.

Ecosystems are useful when you have collections of separate resources for differing sections of your application - http://example.com vs. http://example.com/admin. Creating an Ecosystem for each section allows to you manage each's resources in a collection one place while being able to add new resources to the collection on the fly.

Install

To install Ecosystem as a Composer package, run:

Once it's installed, you can register the service provider in config/app.php in the providers array:

And register the Ecosystem facade in the the aliases array:

Then publish Ecosystems's assets with php artisan vendor:publish. This will add the file config/ecosystem.php. This config file allows certain envionments to disable cache-busting strings.

Usage

Creating a New Ecosystem

Run php artisan from the console, and you'll see the new make:ecosystem command.

Running php artisan make:ecosystem StandardEcosystem from the console will create StandardEcosystem in App\Library\Ecosystems directory. If directory doesn't exist, the command will create it.

To place Ecosystem in a different directory, append --namespace=Your\Namespace\Here to the command. Doing so will create an Ecosystem in the string of directories starting with a lowercase version of the first directory segment - ie --namespace=Resources\Ecosystems would place the Ecosystem in resources\Ecosystems.

The command php artisan make:ecosystem StandardEcosystem would generate the following file in the App\Library\Ecosystems directory.

Adding assets to any of the default collections allows you to display them easily from any view.

This will bundle the assets in a Laravel Collection until they're output in a view. In a view associated with this route

Would output

Attaching to Routes

Ecosystems are assigned to routes and groups of routes by attaching them as middleware.

Ecosystems are overridden so the most immediate one on the route is used

Dynamically Attaching Assets

Because the assets are not compiled and output until runtime, you have the ability to add one-offs to the Collection. This is typically done in a Controller.

Would change the Ecosystem::getHeadScripts() output to

The Ecosystem::addScriptToHead(), Ecosystem::addStylesheet(), Ecosystem::addScriptToFooter() take a maximum of three arguments. A name for the asset, an array of attributes for the asset, and a option to set the asset before one already added to the Collection.

Supplying the name of an already registered asset in the $before argument will push the new asset above the target.

Yields

Available Methods

The Ecosystem facade exposes certain methods to interact with the current Ecosystem while the actions fall within a route which has an Ecosystem registered to it.

These three methods output any assets registered to its collection in html elements and are intended to be used in views:

Ecosystem lets you add one-off assets in any area that the route middleware attached Ecosystem covers. However, this is typically done in Controllers.

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONDUCT for details.

Security

If you discover any security related issues, please email instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of ecosystem with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
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 nathanburkett/ecosystem contains the following files

Loading the files please wait ....