abstract class 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

at line 62
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

at line 96
void __destruct()

Load the assets database file generation

Return Value

void

at line 104
AssetsInstallerInterface getAssetsInstaller()

at line 114
false|string readJsonDatabase()

Reads the assets database from JSON file

Return Value

false|string

at line 131
false|string writeJsonDatabase(array $full_db)

Writes the assets database in a JSON file

Parameters

array $full_db

Return Value

false|string

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

Set the current assets database

Parameters

array $assets_db
AssetsInstallerInterface $installer

Return Value

void

at line 173
static array getRegistry(AssetsInstallerInterface $installer = null)

Get the current assets database

Parameters

AssetsInstallerInterface $installer

Return Value

array

at line 185
static array setGenerator(callable $callable)

Set the generator called at object destruction

Parameters

callable $callable

Return Value

array

at line 200
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

at line 213
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 226
abstract generate()

This must generate the Assets database JSON file