luya\traits\ErrorHandlerTrait::apiServerSendData PHP Method

apiServerSendData() private method

Send the array data to the api server.
private apiServerSendData ( array $data ) : boolean | null
$data array The array to be sent to the server.
return boolean | null true/false if data has been sent to the api successfull or not, null if the transfer is disabled.
    private function apiServerSendData(array $data)
    {
        if ($this->transferException) {
            $curl = new Curl();
            $curl->post(Url::ensureHttp(rtrim($this->api, '/')) . '/create', ['error_json' => Json::encode($data)]);
            return !$curl->error;
        }
        return null;
    }