Skip to content

How does Phassets work

George Petculescu edited this page Jul 5, 2017 · 1 revision

As you already noticed by installing as described for your environment in Getting Started page, Phassets is a library for managing your Web assets.

How is this happening? Here's the complete flow diagram:

The Configurator

Before instantiating the Phassets class, you will have to provide a Configurator. The configurator is a class implementing Phassets\Interfaces\Configurator interface for fetching Phassets' settings by using your own project setup. These settings are used by Phassets lib itself, filter and deployers.

Each may be a generic one, having only a name and a value, e.g. [assets_source] => array(__DIR__ . 'assets'), or it may be a sub-setting, having also an index, e.g. [filesystem_deployer][destination_path] => __DIR__ . 'public'. So if you are developing a custom project, without any framework integration, then your setup must allow retrieval of these 2 types of settings.

To learn more about how to use this library, please go back to Getting Started page and continue with the other sections.