MenzzoApi
extends TransactionalService
in package
Class Menzzo2Api
Table of Contents
Properties
- $admin_password : mixed
- $admin_username : mixed
- $container : ContainerInterface
- $em : EntityManager
- $password : mixed
- $token_url : mixed
- $url : mixed
- $username : mixed
- $accessToken : string
- $apiKeyConfigCode : string
Methods
- __construct() : mixed
- Menzzo2Api constructor.
- addRepository() : void
- Add a repository to this service
- addService() : void
- Add a service to this service
- getApiToken() : bool|mixed
- Get Api Token
- getEntityManager() : EntityManager
- Getter of the Entity Manager
- refreshApiToken() : bool|mixed|string
- Refreshing Api Access
- 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
$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()
Menzzo2Api 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
getApiToken()
Get Api Token
public
getApiToken(mixed $username, mixed $password) : bool|mixed
Parameters
- $username : mixed
- $password : mixed
Tags
Return values
bool|mixed —(string) token
getEntityManager()
Getter of the Entity Manager
public
getEntityManager() : EntityManager
Return values
EntityManagerrefreshApiToken()
Refreshing Api Access
public
refreshApiToken(mixed $username, mixed $password) : bool|mixed|string
Parameters
- $username : mixed
- $password : mixed
Tags
Return values
bool|mixed|stringsetEntityManager()
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