AttributeApi
extends MenzzoApi
in package
Class AttributeApi
Table of Contents
Properties
- $admin_password : mixed
- $admin_username : mixed
- $base_url : mixed
- $container : ContainerInterface
- $em : EntityManager
- $password : mixed
- $token_url : mixed
- $url : mixed
- $username : mixed
- $accessToken : string
- $apiKeyConfigCode : string
Methods
- __construct() : mixed
- AttributeApi constructor.
- addRepository() : void
- Add a repository to this service
- addService() : void
- Add a service to this service
- getAllAttributesSetAttributes() : array<string|int, mixed>|mixed
- getAllOptionByAttributes() : array<string|int, mixed>|mixed
- getApiToken() : bool|mixed
- Get Api Token
- getAtrributeOptions() : false|mixed
- getAttributeSetByCriteria() : bool|mixed
- Get attributeSet by criteria
- getAttributeSetsAttribute() : array<string|int, mixed>|mixed
- getEntityManager() : EntityManager
- Getter of the Entity Manager
- getGroupeNameAttribute() : mixed
- getListMappingListAttribute() : array<string|int, mixed>|mixed
- getMeduseAttributeSetMapping() : array<string|int, mixed>|mixed
- refreshApiToken() : bool|mixed|string
- Refreshing Api Access
- saveAttributeNewOption() : array<string|int, mixed>|mixed
- setEntityManager() : mixed
- Setter of the Entity Manager
- execute() : mixed
- formatResponse() : false|mixed
- Returning array from response
Properties
$admin_password
protected
mixed
$admin_password
Tags
$admin_username
protected
mixed
$admin_username
Tags
$base_url
protected
mixed
$base_url
Tags
$container
protected
ContainerInterface
$container
$em
protected
EntityManager
$em
The Entity Manager
$password
protected
mixed
$password
Tags
$token_url
protected
mixed
$token_url
Tags
$url
protected
mixed
$url
Tags
$username
protected
mixed
$username
Tags
$accessToken
private
string
$accessToken
= ''
$apiKeyConfigCode
private
string
$apiKeyConfigCode
= 'MZ_MAGENTO_ACCESS_TOKEN'
Methods
__construct()
AttributeApi constructor.
public
__construct(mixed $base_url, mixed $token_url, mixed $username, mixed $password) : mixed
Parameters
- $base_url : mixed
- $token_url : mixed
- $username : mixed
- $password : mixed
addRepository()
Add a repository to this service
public
addRepository(int $key, string $class) : void
Parameters
- $key : int
-
Key
- $class : string
-
Class
addService()
Add a service to this service
public
addService(int $key, mixed $service) : void
Parameters
- $key : int
-
Key
- $service : mixed
getAllAttributesSetAttributes()
public
getAllAttributesSetAttributes(mixed $attrSetId) : array<string|int, mixed>|mixed
Parameters
- $attrSetId : mixed
Return values
array<string|int, mixed>|mixedgetAllOptionByAttributes()
public
getAllOptionByAttributes() : array<string|int, mixed>|mixed
Return values
array<string|int, mixed>|mixedgetApiToken()
Get Api Token
public
getApiToken(mixed $username, mixed $password) : bool|mixed
Parameters
- $username : mixed
- $password : mixed
Tags
Return values
bool|mixed —(string) token
getAtrributeOptions()
public
getAtrributeOptions(string $attributeCode) : false|mixed
Parameters
- $attributeCode : string
Return values
false|mixedgetAttributeSetByCriteria()
Get attributeSet by criteria
public
getAttributeSetByCriteria(mixed $criteria[, bool $asArray = true ]) : bool|mixed
Parameters
- $criteria : mixed
- $asArray : bool = true
Tags
Return values
bool|mixed —(array)
getAttributeSetsAttribute()
public
getAttributeSetsAttribute(mixed $attrSet) : array<string|int, mixed>|mixed
Parameters
- $attrSet : mixed
Return values
array<string|int, mixed>|mixedgetEntityManager()
Getter of the Entity Manager
public
getEntityManager() : EntityManager
Return values
EntityManagergetGroupeNameAttribute()
public
getGroupeNameAttribute(mixed $attributeSetId, mixed $attributeId) : mixed
Parameters
- $attributeSetId : mixed
- $attributeId : mixed
getListMappingListAttribute()
public
getListMappingListAttribute(mixed $attr) : array<string|int, mixed>|mixed
Parameters
- $attr : mixed
Return values
array<string|int, mixed>|mixedgetMeduseAttributeSetMapping()
public
getMeduseAttributeSetMapping() : array<string|int, mixed>|mixed
Return values
array<string|int, mixed>|mixedrefreshApiToken()
Refreshing Api Access
public
refreshApiToken(mixed $username, mixed $password) : bool|mixed|string
Parameters
- $username : mixed
- $password : mixed
Tags
Return values
bool|mixed|stringsaveAttributeNewOption()
public
saveAttributeNewOption(mixed $attributCode, mixed $arrayData) : array<string|int, mixed>|mixed
Parameters
- $attributCode : mixed
- $arrayData : mixed
Return values
array<string|int, mixed>|mixedsetEntityManager()
Setter of the Entity Manager
public
setEntityManager(EntityManager $em) : mixed
Parameters
- $em : EntityManager
-
the Entity Manager
execute()
protected
execute(mixed $requestType, mixed $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : mixed
Parameters
- $requestType : mixed
- $endpoint : mixed
- $body : array<string|int, mixed> = []
- $headers : array<string|int, mixed> = []
formatResponse()
Returning array from response
protected
formatResponse(mixed $response) : false|mixed
Parameters
- $response : mixed