\Xima\XmTools\Classes\API\RESTConnector

The Api facade. The API configuration must be done through the TYPO3 constant editor for the concrete extension.

Summary

Methods
Properties
Constants
get()
post()
setExtension()
No public properties found
No constants found
No protected methods found
$extension
$typo3Services
$cacheManager
N/A
No private methods found
No private properties found
N/A

Properties

Methods

get()

get(string  $url, \Xima\XmTools\Classes\API\REST\Repository\ApiRepository  $repository) : array

Gets called by repositories inheriting from Xima\XmTools\Classes\API\REST\Repository\AbstractApiRepository, retrieves JSON responses, converts arrays to objects according to the given repository class name (if existing) or to array of arrays.

Translates values to the current or fallback language when fields with the following patterns are found: -nameDe, nameEn... -name_de, name_en... Calls cache or calls API and stores result in cache if older than one day.

Parameters

string $url
\Xima\XmTools\Classes\API\REST\Repository\ApiRepository $repository

Returns

array

post()

post(  $url,   $data) 

Parameters

$url
$data