VPEStorage
in package
implements
VPEStorageInterface
Class VPEStorage
Tags
Interfaces, Classes and Traits
- VPEStorageInterface
- Interface VPEStorageInterface
Table of Contents
- $languageProvider : LanguageProvider
- $queryBuilder : CI_DB_query_builder
- __construct() : mixed
- delete() : VPEStorageInterface
- Deletes VPE entity data in database.
- getAll() : array<string|int, mixed>
- Returns all VPE entities data as array.
- getById() : array<string|int, mixed>
- Returns VPE entity data by the given id.
- save() : VPEStorageInterface
- Saves VPE entity data in database.
- update() : VPEStorageInterface
- Updates VPE entity data in database.
- _isDefault() : bool
- Checks if the vpe entity of given id is shops default.
- _updateDefault() : VPEStorageInterface
- Checks if vpe entity is default. If true, the id will set to the vpe default value in the configuration table.
Properties
$languageProvider
protected
LanguageProvider
$languageProvider
$queryBuilder
protected
CI_DB_query_builder
$queryBuilder
Methods
__construct()
public
__construct(CI_DB_query_builder $queryBuilder, LanguageProvider $languageProvider) : mixed
Parameters
- $queryBuilder : CI_DB_query_builder
- $languageProvider : LanguageProvider
Return values
mixed —delete()
Deletes VPE entity data in database.
public
delete(VPEInterface $vpe) : VPEStorageInterface
Parameters
- $vpe : VPEInterface
-
VPE entity to be delete.
Return values
VPEStorageInterface —Same instance for chained method calls.
getAll()
Returns all VPE entities data as array.
public
getAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —getById()
Returns VPE entity data by the given id.
public
getById(IdType $vpeId) : array<string|int, mixed>
Parameters
- $vpeId : IdType
Return values
array<string|int, mixed> —save()
Saves VPE entity data in database.
public
save(VPEInterface $vpe) : VPEStorageInterface
Parameters
- $vpe : VPEInterface
-
VPE entity to be saved.
Return values
VPEStorageInterface —Same instance for chained method calls.
update()
Updates VPE entity data in database.
public
update(VPEInterface $vpe) : VPEStorageInterface
Parameters
- $vpe : VPEInterface
-
VPE entity to be updated.
Return values
VPEStorageInterface —Same instance for chained method calls.
_isDefault()
Checks if the vpe entity of given id is shops default.
private
_isDefault(IdType $vpeId) : bool
Parameters
- $vpeId : IdType
-
Id of expected vpe default entity.
Return values
bool —True if entity is default, false otherwise.
_updateDefault()
Checks if vpe entity is default. If true, the id will set to the vpe default value in the configuration table.
private
_updateDefault(VPEInterface $vpe) : VPEStorageInterface
Parameters
- $vpe : VPEInterface
-
Vpe entity to check and set as shops default.
Return values
VPEStorageInterface —Same instance for chained method calls.