Database implements IRepository, IDatabase, IFindById, IFindByExternalId, IFindByText, IFindParents, ISave, ISaveParents, IDelete, IScope
FinalYes
Class Database
Table of Contents
Interfaces
- IRepository
- Interface IRepository
- IDatabase
- Interface IRepositoryDatabase
- IFindById
- Interface IFindById
- IFindByExternalId
- Interface IFindByExternalId
- IFindByText
- Interface IFindByText
- IFindParents
- Interface IFindParent
- ISave
- Interface ISave
- ISaveParents
- Interface ISaveParents
- IDelete
- Interface IDelete
- IScope
Methods
- delete() : Result
- findByExternalId() : Location|null|bool
- findById() : Location|null|bool
- findByText() : Collection|bool
- findParents() : Parents
- isScopeSatisfy() : bool
- Check is scope satisfy
- save() : AddResult|UpdateResult
- saveParents() : Result
Methods
delete()
public
delete(Location $location) : Result
Parameters
- $location : Location
Tags
Return values
Result —todo: with inheritance or not
findByExternalId()
public
findByExternalId(string $externalId, string $sourceCode, string $languageId) : Location|null|bool
Parameters
- $externalId : string
- $sourceCode : string
- $languageId : string
Tags
Return values
Location|null|boolfindById()
public
findById(int $id, string $languageId) : Location|null|bool
Parameters
- $id : int
- $languageId : string
Tags
Return values
Location|null|boolfindByText()
public
findByText(string $text, string $languageId) : Collection|bool
Parameters
- $text : string
- $languageId : string
Tags
Return values
Collection|boolfindParents()
public
findParents(Location $location, string $languageId) : Parents
Parameters
- $location : Location
- $languageId : string
Tags
Return values
ParentsisScopeSatisfy()
Check is scope satisfy
public
isScopeSatisfy(int $scope) : bool
Parameters
- $scope : int
Tags
Return values
boolsave()
public
save(Location $location) : AddResult|UpdateResult
Parameters
- $location : Location
Tags
Return values
AddResult|UpdateResultsaveParents()
public
saveParents(Parents $parents) : Result
Parameters
- $parents : Parents