PackageManagerFactory
in package
implements
PackageManagerFactoryInterface
Package managers factory class
Table of Contents
Interfaces
- PackageManagerFactoryInterface
- Package factory interface
Properties
- $cache : CacheInterface
- Cache
- $httpClient : HttpClientInterface
- Http client
- $packageCategory : array<string|int, mixed>
- Package categories
- $packageClass : array<string|int, mixed>
- Custom package classes
- $packagePath : array<string|int, mixed>
- Packages path
- $packageRegistryClass : array<string|int, mixed>
- Package registry casses
- $storage : StorageInterface
- Local storage
Methods
- __construct() : mixed
- Constructor
- create() : PackageManagerInterface|null
- Create package manager
- createPackageRegistry() : object|null
- Create package registry
- createValidator() : PackageValidator
- Create validator
- getPackageClass() : string|null
- Get package path
- getPackageDescriptorFileName() : string
- Get package descriptor file name
- getPackagePath() : string|null
- Get package path
- registry() : object|null
- Create package registry
- setPackageClass() : void
- Set package class
- setPackagePath() : void
- Set package path
- setPackageRegistryClass() : void
- Set package registry class
Properties
$cache
Cache
private
CacheInterface
$cache
$httpClient
Http client
private
HttpClientInterface
$httpClient
$packageCategory
Package categories
private
static array<string|int, mixed>
$packageCategory
= ['themes' => \Arikaim\Core\Packages\PackageManager::TEMPLATE_PACKAGE, 'extensions' => \Arikaim\Core\Packages\PackageManager::EXTENSION_PACKAGE, 'modules' => \Arikaim\Core\Packages\PackageManager::MODULE_PACKAGE, 'composer' => \Arikaim\Core\Packages\PackageManager::COMPOSER_PACKAGE, 'components' => \Arikaim\Core\Packages\PackageManager::COMPONENTS_LIBRARY_PACKAGE, 'services' => \Arikaim\Core\Packages\PackageManager::SERVICE_PACKAGE]
$packageClass
Custom package classes
private
static array<string|int, mixed>
$packageClass
= [\Arikaim\Core\Packages\PackageManager::EXTENSION_PACKAGE => 'Arikaim\\Core\\Packages\\ExtensionPackage', \Arikaim\Core\Packages\PackageManager::LIBRARY_PACKAGE => 'Arikaim\\Core\\Packages\\LibraryPackage', \Arikaim\Core\Packages\PackageManager::TEMPLATE_PACKAGE => 'Arikaim\\Core\\Packages\\TemplatePackage', \Arikaim\Core\Packages\PackageManager::MODULE_PACKAGE => 'Arikaim\\Core\\Packages\\ModulePackage', \Arikaim\Core\Packages\PackageManager::COMPOSER_PACKAGE => 'Arikaim\\Core\\Packages\\ComposerPackage', \Arikaim\Core\Packages\PackageManager::COMPONENTS_LIBRARY_PACKAGE => 'Arikaim\\Core\\Packages\\ComponentsLibraryPackage', \Arikaim\Core\Packages\PackageManager::SERVICE_PACKAGE => 'Arikaim\\Core\\Packages\\ServicePackage']
$packagePath
Packages path
private
static array<string|int, mixed>
$packagePath
= [\Arikaim\Core\Packages\PackageManager::EXTENSION_PACKAGE => \Arikaim\Core\Utils\Path::EXTENSIONS_PATH, \Arikaim\Core\Packages\PackageManager::LIBRARY_PACKAGE => \Arikaim\Core\Utils\Path::LIBRARY_PATH, \Arikaim\Core\Packages\PackageManager::TEMPLATE_PACKAGE => \Arikaim\Core\Utils\Path::TEMPLATES_PATH, \Arikaim\Core\Packages\PackageManager::MODULE_PACKAGE => \Arikaim\Core\Utils\Path::MODULES_PATH, \Arikaim\Core\Packages\PackageManager::COMPOSER_PACKAGE => \Arikaim\Core\Utils\Path::COMPOSER_VENDOR_PATH, \Arikaim\Core\Packages\PackageManager::COMPONENTS_LIBRARY_PACKAGE => \Arikaim\Core\Utils\Path::COMPONENTS_PATH, \Arikaim\Core\Packages\PackageManager::SERVICE_PACKAGE => \Arikaim\Core\Utils\Path::SERVICES_PATH]
$packageRegistryClass
Package registry casses
private
static array<string|int, mixed>
$packageRegistryClass
= [\Arikaim\Core\Packages\PackageManager::EXTENSION_PACKAGE => CORE_NAMESPACE . '\\Models\\Extensions', \Arikaim\Core\Packages\PackageManager::LIBRARY_PACKAGE => null, \Arikaim\Core\Packages\PackageManager::TEMPLATE_PACKAGE => null, \Arikaim\Core\Packages\PackageManager::MODULE_PACKAGE => CORE_NAMESPACE . '\\Models\\Modules', \Arikaim\Core\Packages\PackageManager::COMPOSER_PACKAGE => null, \Arikaim\Core\Packages\PackageManager::COMPONENTS_LIBRARY_PACKAGE => null, \Arikaim\Core\Packages\PackageManager::SERVICE_PACKAGE => null]
$storage
Local storage
private
StorageInterface
$storage
Methods
__construct()
Constructor
public
__construct(CacheInterface $cache, StorageInterface $storage, HttpClientInterface $httpClient) : mixed
Parameters
- $cache : CacheInterface
- $storage : StorageInterface
- $httpClient : HttpClientInterface
create()
Create package manager
public
create(string $packageType) : PackageManagerInterface|null
Parameters
- $packageType : string
Return values
PackageManagerInterface|nullcreatePackageRegistry()
Create package registry
public
static createPackageRegistry(string $packageType) : object|null
Parameters
- $packageType : string
Return values
object|nullcreateValidator()
Create validator
public
createValidator([array<string|int, mixed>|null $requires = [] ]) : PackageValidator
Parameters
- $requires : array<string|int, mixed>|null = []
Return values
PackageValidatorgetPackageClass()
Get package path
public
static getPackageClass(string $packageType) : string|null
Parameters
- $packageType : string
Return values
string|nullgetPackageDescriptorFileName()
Get package descriptor file name
public
static getPackageDescriptorFileName(string $packageType, string $packageName) : string
Parameters
- $packageType : string
- $packageName : string
Return values
stringgetPackagePath()
Get package path
public
static getPackagePath(string $packageType) : string|null
Parameters
- $packageType : string
Return values
string|nullregistry()
Create package registry
public
registry(string $packageType) : object|null
Parameters
- $packageType : string
Return values
object|nullsetPackageClass()
Set package class
public
static setPackageClass(string $packageType, string $class) : void
Parameters
- $packageType : string
- $class : string
setPackagePath()
Set package path
public
static setPackagePath(string $packageType, string $path) : void
Parameters
- $packageType : string
- $path : string
setPackageRegistryClass()
Set package registry class
public
static setPackageRegistryClass(string $packageType, string $class) : void
Parameters
- $packageType : string
- $class : string