class Package implements PackageInterface

Package base class

Properties

protected CollectionInterface $properties Package properties
protected PackageRegistryInterface|null $packageRegistry Package Registry Interface
protected string $path Package root path

Methods

__construct(string $path, CollectionInterface $properties, PackageRegistryInterface|null $packageRegistry = null)

Constructor

array
getDrivers()

Get drivers classes list

bool
isInstalled()

Return true if package is installed

validator()

Create package validator

string
getPath()

Get package root path

string
getVersion()

Get Package version

array|null
getLanguages()

Get suppported languages

bool
setPrimary()

Set package as primary

string|null
getType()

Get package type

mixed
getInstalOrder(mixed|null $default = null)

Get install order

string
getName()

Return package name

Collection
getProperties(bool $full = false)

Return package properties

CollectionInterface
getRequire()

Get require property

mixed
getProperty(string $name, mixed $default = null)

Get package property

bool
validate()

Validate package properties

bool
install(bool|null $primary = null)

Install package.

bool
postInstall()

Run post install actions

bool
unInstall()

UnInstall package

bool
enable()

Enable package

bool
disable()

Disable package

bool
savePackageProperties()

Save package properties file

Details

at line 53
__construct(string $path, CollectionInterface $properties, PackageRegistryInterface|null $packageRegistry = null)

Constructor

Parameters

string $path
CollectionInterface $properties
PackageRegistryInterface|null $packageRegistry

at line 66
array getDrivers()

Get drivers classes list

Return Value

array

at line 76
bool isInstalled()

Return true if package is installed

Return Value

bool

at line 86
PackageValidator validator()

Create package validator

Return Value

PackageValidator

at line 96
string getPath()

Get package root path

Return Value

string

at line 106
string getVersion()

Get Package version

Return Value

string

at line 116
array|null getLanguages()

Get suppported languages

Return Value

array|null

at line 126
bool setPrimary()

Set package as primary

Return Value

bool

at line 136
string|null getType()

Get package type

Return Value

string|null

at line 147
mixed getInstalOrder(mixed|null $default = null)

Get install order

Parameters

mixed|null $default

Return Value

mixed

at line 157
string getName()

Return package name

Return Value

string

at line 168
Collection getProperties(bool $full = false)

Return package properties

Parameters

bool $full

Return Value

Collection

at line 178
CollectionInterface getRequire()

Get require property

Return Value

CollectionInterface

at line 192
mixed getProperty(string $name, mixed $default = null)

Get package property

Parameters

string $name
mixed $default

Return Value

mixed

at line 202
bool validate()

Validate package properties

Return Value

bool

at line 213
bool install(bool|null $primary = null)

Install package.

Parameters

bool|null $primary Primary package replaces routes or other params

Return Value

bool

at line 223
bool postInstall()

Run post install actions

Return Value

bool

at line 233
bool unInstall()

UnInstall package

Return Value

bool

at line 243
bool enable()

Enable package

Return Value

bool

at line 253
bool disable()

Disable package

Return Value

bool

at line 263
bool savePackageProperties()

Save package properties file

Return Value

bool