class AssetsAutoloadGenerator extends AbstractAssetsAutoloadGenerator

Methods

static object
getInstance(AssetsInstallerInterface $installer = null)

Get a singleton instance

void
__destruct()

Load the assets database file generation

false|string
readJsonDatabase()

Reads the assets database from JSON file

false|string
writeJsonDatabase(array $full_db)

Writes the assets database in a JSON file

static void
setRegistry(array $assets_db, AssetsInstallerInterface $installer = null)

Set the current assets database

static array
getRegistry(AssetsInstallerInterface $installer = null)

Get the current assets database

static array
setGenerator(callable $callable)

Set the generator called at object destruction

static void
registerPackage(PackageInterface $package, string $target, AssetsInstallerInterface $installer = null)

Add a new installed package in the Assets database

static void
unregisterPackage(PackageInterface $package, AssetsInstallerInterface $installer = null)

Remove an uninstalled package from the Assets database

generate()

This must generate the Assets database JSON file

Details

static object getInstance(AssetsInstallerInterface $installer = null)

Get a singleton instance

Parameters

AssetsInstallerInterface $installer

Return Value

object

Exceptions

InvalidArgumentException if no argument received while it was required

void __destruct()

Load the assets database file generation

Return Value

void

AssetsInstallerInterface getAssetsInstaller()

false|string readJsonDatabase()

Reads the assets database from JSON file

Return Value

false|string

false|string writeJsonDatabase(array $full_db)

Writes the assets database in a JSON file

Parameters

array $full_db

Return Value

false|string

static void setRegistry(array $assets_db, AssetsInstallerInterface $installer = null)

Set the current assets database

Parameters

array $assets_db
AssetsInstallerInterface $installer

Return Value

void

static array getRegistry(AssetsInstallerInterface $installer = null)

Get the current assets database

Parameters

AssetsInstallerInterface $installer

Return Value

array

static array setGenerator(callable $callable)

Set the generator called at object destruction

Parameters

callable $callable

Return Value

array

static void registerPackage(PackageInterface $package, string $target, AssetsInstallerInterface $installer = null)

Add a new installed package in the Assets database

Parameters

PackageInterface $package
string $target
AssetsInstallerInterface $installer

Return Value

void

static void unregisterPackage(PackageInterface $package, AssetsInstallerInterface $installer = null)

Remove an uninstalled package from the Assets database

Parameters

PackageInterface $package
AssetsInstallerInterface $installer

Return Value

void

at line 40
generate()

This must generate the Assets database JSON file