Arikaim CMS

LibraryPackage extends Package
in package
implements PackageInterface Uses PhpConfigFile

UI Library Package class

Table of Contents

Interfaces

PackageInterface
Package interface, all packages type should impelement it.

Constants

LIBRARY_PARAMS_FILE_NAME  = \Arikaim\Core\Utils\Path::CONFIG_PATH . 'ui-library.php'
Library params config file

Properties

$comments  : array<string|int, mixed>
Config array comments
$packageRegistry  : PackageRegistryInterface|null
Package Registry Interface
$path  : string
Package root path
$properties  : CollectionInterface
Package properties

Methods

__construct()  : mixed
Constructor
disable()  : bool
Disable library
enable()  : void
Enable library
getDrivers()  : array<string|int, mixed>
Get drivers classes list
getInstalOrder()  : mixed
Get install order
getLanguages()  : array<string|int, mixed>|null
Get suppported languages
getLibraryParams()  : array<string|int, mixed>
Get library params
getName()  : string
Return package name
getParams()  : array<string|int, mixed>
Get library params
getPath()  : string
Get package root path
getProperties()  : CollectionInterface
Return package properties
getProperty()  : mixed
Get package property
getRequire()  : CollectionInterface
Get require property
getThemeFile()  : string
Get theme file (DEPRECATED)
getType()  : string|null
Get package type
getVersion()  : string
Get Package version
include()  : array<string|int, mixed>|null
Include file
includeConfigFile()  : array<string|int, mixed>|null
Include config file
includePhpArray()  : array<string|int, mixed>|null
Include php array
install()  : mixed
Install package.
isInstalled()  : bool
Return true if package is installed
postInstall()  : bool
Run post install actions
saveConfigFile()  : bool
Save config file
saveLibraryParams()  : bool
Save ui library params
savePackageProperties()  : bool
Save package properties file
setPrimary()  : bool
Set package as primary
setStatus()  : void
Set library status (enabled, disbled)
unInstall()  : bool
UnInstall package
validate()  : bool
Validate package properties
validator()  : PackageValidator
Create package validator
exportArray()  : string
Export array as text
exportConfig()  : string
Export config as text
exportItem()  : string
Export item as text
getCommentsText()  : string
Get array imtem comment as text
setComment()  : void
Set array key comment
determineMaxTabs()  : int
Get max tabs count
determineTabs()  : int
Get tabs count for array key
getFileContent()  : string
Return config file content
getFileContentHeader()  : string
Get config file header
getTabs()  : string
Get tabs text

Constants

LIBRARY_PARAMS_FILE_NAME

Library params config file

public mixed LIBRARY_PARAMS_FILE_NAME = \Arikaim\Core\Utils\Path::CONFIG_PATH . 'ui-library.php'

Properties

$comments

Config array comments

protected array<string|int, mixed> $comments = []

$path

Package root path

protected string $path

Methods

disable()

Disable library

public disable() : bool
Return values
bool

getDrivers()

Get drivers classes list

public getDrivers() : array<string|int, mixed>
Return values
array<string|int, mixed>

getInstalOrder()

Get install order

public getInstalOrder([mixed|null $default = null ]) : mixed
Parameters
$default : mixed|null = null

getLanguages()

Get suppported languages

public getLanguages() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getLibraryParams()

Get library params

public getLibraryParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getName()

Return package name

public getName() : string
Return values
string

getParams()

Get library params

public getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPath()

Get package root path

public getPath() : string
Return values
string

getProperty()

Get package property

public getProperty(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null

getThemeFile()

Get theme file (DEPRECATED)

public getThemeFile(string $theme) : string
Parameters
$theme : string
Return values
string

getType()

Get package type

public getType() : string|null
Return values
string|null

getVersion()

Get Package version

public getVersion() : string
Return values
string

include()

Include file

public include(string $fileName) : array<string|int, mixed>|null
Parameters
$fileName : string

Full file name

Return values
array<string|int, mixed>|null

includeConfigFile()

Include config file

public includeConfigFile(string $fileName[, string|null $extensionName = null ]) : array<string|int, mixed>|null
Parameters
$fileName : string
$extensionName : string|null = null
Return values
array<string|int, mixed>|null

includePhpArray()

Include php array

public includePhpArray(string $fileName) : array<string|int, mixed>|null
Parameters
$fileName : string
Return values
array<string|int, mixed>|null

install()

Install package.

public install([bool|null $primary = null ]) : mixed
Parameters
$primary : bool|null = null

Primary package replaces routes or other params

isInstalled()

Return true if package is installed

public isInstalled() : bool
Return values
bool

postInstall()

Run post install actions

public postInstall() : bool
Return values
bool

saveConfigFile()

Save config file

public saveConfigFile(string $fileName, array<string|int, mixed> $data) : bool
Parameters
$fileName : string
$data : array<string|int, mixed>
Return values
bool

saveLibraryParams()

Save ui library params

public saveLibraryParams(array<string|int, mixed> $params) : bool
Parameters
$params : array<string|int, mixed>
Return values
bool

savePackageProperties()

Save package properties file

public savePackageProperties() : bool
Return values
bool

setPrimary()

Set package as primary

public setPrimary() : bool
Return values
bool

setStatus()

Set library status (enabled, disbled)

public setStatus(bool $status) : void
Parameters
$status : bool

unInstall()

UnInstall package

public unInstall() : bool
Return values
bool

validate()

Validate package properties

public validate() : bool
Return values
bool

exportArray()

Export array as text

protected exportArray(array<string|int, mixed> $data, string $arrayKey[, int $currentTab = 1 ]) : string
Parameters
$data : array<string|int, mixed>
$arrayKey : string
$currentTab : int = 1
Return values
string

exportConfig()

Export config as text

protected exportConfig(array<string|int, mixed> $data) : string
Parameters
$data : array<string|int, mixed>
Return values
string

exportItem()

Export item as text

protected exportItem(string|int $key, mixed $value, int $maxTabs[, int $startTab = 1 ]) : string
Parameters
$key : string|int
$value : mixed
$maxTabs : int
$startTab : int = 1
Return values
string

getCommentsText()

Get array imtem comment as text

protected getCommentsText(string $key) : string
Parameters
$key : string
Return values
string

setComment()

Set array key comment

protected setComment(string $comment, string $key) : void
Parameters
$comment : string
$key : string

determineMaxTabs()

Get max tabs count

private determineMaxTabs(array<string|int, mixed> $data[, int $tabSize = 4 ]) : int
Parameters
$data : array<string|int, mixed>
$tabSize : int = 4
Return values
int

determineTabs()

Get tabs count for array key

private determineTabs(string $key[, int $tabSize = 4 ]) : int
Parameters
$key : string
$tabSize : int = 4
Return values
int

getFileContent()

Return config file content

private getFileContent(array<string|int, mixed> $data) : string
Parameters
$data : array<string|int, mixed>
Return values
string

getFileContentHeader()

Get config file header

private getFileContentHeader() : string
Return values
string

getTabs()

Get tabs text

private getTabs(int $count) : string
Parameters
$count : int
Return values
string

        
On this page

Search results