AreaService extends Service
in package
Uses ServiceTrait

This is the area service class.

This class will retrieve the areas from LogiCommerce API and transform them to objects. All the needed banner operations previous to Framework must be done here.

Tags
see
AreaService::getAreas()
see
AreaService::getArea()
see
AreaService::getCategoriesArea()
see
AreaService::getCategoriesAreaCategories()
see
AreaService::getCategoriesAreaCategoriesTree()
see
Area
see
AreaService::addGetAreas()
see
AreaService::addGetArea()
see
AreaService::addGetCategoriesArea()
see
AreaService::addGetCategoriesAreaCategories()
see
AreaService::addGetCategoriesAreaCategoriesTree()
see
BatchRequests
see
Service
see
ServiceTrait
uses
ServiceTrait

Table of Contents

DELETE  = \SDK\Core\Enums\MethodType::DELETE
GET  = \SDK\Core\Enums\MethodType::GET
ITEMS  = 'items'
POST  = \SDK\Core\Enums\MethodType::POST
PUT  = \SDK\Core\Enums\MethodType::PUT
addGetArea() Add the request to get the area identified by the given id  : void
addGetAreas() Add the request to get the areas filtered with the given parameters  : void
addGetCategoriesArea() Add the request to get the area setted with the category role  : void
addGetCategoriesAreaCategories() Add the request to get the categories inside the area setted with the category role  : void
addGetCategoriesAreaCategoriesTree() Add the request to get the categories tree inside the area setted with the category role  : void
getArea() Returns the area identified by the given id  : Area|null
getAreas() Returns the areas filtered with the given parameters  : ElementCollection|null
getCategoriesArea() Returns the area setted with the category role  : Area|null
getCategoriesAreaCategories() Returns the categories inside the area setted with the category role  : ElementCollection|null
getCategoriesAreaCategoriesTree() Returns the categories tree inside the area setted with the category role  : ElementCollection|null
getInstance() Returns the requested model instance.  : Service
__construct()  : mixed
call()  : array<string|int, mixed>
extractParameters()  : array<string|int, mixed>
getCollection()  : mixed
getConnection()  : Connection
getElement()  : Element|null
getElements()  : ElementCollection|null
getResourceElement()  : Element|null
getResponse()  : ElementCollection|null
prepareElement()  : Element|null
prepareElements()  : array<string|int, mixed>
replaceWildcards()  : string

Constants

DELETE

protected mixed DELETE = \SDK\Core\Enums\MethodType::DELETE

GET

protected mixed GET = \SDK\Core\Enums\MethodType::GET

ITEMS

protected mixed ITEMS = 'items'

POST

protected mixed POST = \SDK\Core\Enums\MethodType::POST

PUT

protected mixed PUT = \SDK\Core\Enums\MethodType::PUT

Methods

addGetArea()

Add the request to get the area identified by the given id

public addGetArea(BatchRequests $batchRequests, string $batchName, int $id) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$id : int
Return values
void

addGetAreas()

Add the request to get the areas filtered with the given parameters

public addGetAreas(BatchRequests $batchRequests, string $batchName[, AreaParametersGroup $params = null ]) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$params : AreaParametersGroup = null

object with the needed filters to send to the API areas resource

Return values
void

addGetCategoriesArea()

Add the request to get the area setted with the category role

public addGetCategoriesArea(BatchRequests $batchRequests, string $batchName) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

Return values
void

addGetCategoriesAreaCategories()

Add the request to get the categories inside the area setted with the category role

public addGetCategoriesAreaCategories(BatchRequests $batchRequests, string $batchName[, AreaCategoryParametersGroup $params = null ]) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$params : AreaCategoryParametersGroup = null

object with the needed filters to send to the API

Return values
void

addGetCategoriesAreaCategoriesTree()

Add the request to get the categories tree inside the area setted with the category role

public addGetCategoriesAreaCategoriesTree(BatchRequests $batchRequests, string $batchName[, AreaCategoriesTreeParametersGroup $params = null ]) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$params : AreaCategoriesTreeParametersGroup = null

object with the needed filters to send to the API

Return values
void

getArea()

Returns the area identified by the given id

public getArea(int $id) : Area|null
Parameters
$id : int
Return values
Area|null

getCategoriesArea()

Returns the area setted with the category role

public getCategoriesArea() : Area|null
Return values
Area|null

getInstance()

Returns the requested model instance.

public static getInstance() : Service

If is not setted, this method will set it.

Return values
Service

__construct()

protected __construct() : mixed
Return values
mixed

call()

protected call(Request $request[, string $apiUrl = null ]) : array<string|int, mixed>
Parameters
$request : Request
$apiUrl : string = null
Return values
array<string|int, mixed>

extractParameters()

protected extractParameters([ParametersGroup|null $parametersGroup = null ]) : array<string|int, mixed>
Parameters
$parametersGroup : ParametersGroup|null = null
Return values
array<string|int, mixed>

getCollection()

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

getElement()

protected getElement(string $class, string $resource[, int $id = null ][, mixed $params = null ]) : Element|null
Parameters
$class : string
$resource : string
$id : int = null
$params : mixed = null
Return values
Element|null

getResourceElement()

protected getResourceElement(string $class, string $resource[, mixed $params = [] ]) : Element|null
Parameters
$class : string
$resource : string
$params : mixed = []
Return values
Element|null

getResponse()

protected getResponse(array<string|int, mixed> $data, string $class) : ElementCollection|null
Parameters
$data : array<string|int, mixed>
$class : string
Return values
ElementCollection|null

prepareElement()

protected prepareElement(array<string|int, mixed> $data, string $class) : Element|null
Parameters
$data : array<string|int, mixed>
$class : string
Return values
Element|null

prepareElements()

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

replaceWildcards()

protected replaceWildcards(string $resource, array<string|int, mixed> $wildcards) : string
Parameters
$resource : string
$wildcards : array<string|int, mixed>
Return values
string

Search results