Documentation

GusClient extends SoapClient
in package

Gus client class.

Table of Contents

CONFIG  = ['apiKey' => 'd2df36a7394c432e88ea', 'addressToService' => 'https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc', 'addressToWsdl' => 'https://wyszukiwarkaregon.stat.gov.pl/wsBIR/wsdl/UslugaBIRzewnPubl-ver11-prod.wsdl']
HEADER_NAMESPACE  = 'http://www.w3.org/2005/08/addressing'
PKD_REPORTS  = ['BIR11OsPrawna' => 'BIR11OsPrawnaPkd', 'BIR11OsFizycznaDzialalnoscCeidg' => 'BIR11OsFizycznaPkd', 'BIR11OsFizycznaDzialalnoscRolnicza' => 'BIR11OsFizycznaPkd', 'BIR11OsFizycznaDzialalnoscPozostala' => 'BIR11OsFizycznaPkd', 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108' => 'BIR11OsFizycznaPkd', 'BIR11JednLokalnaOsPrawnej' => 'BIR11JednLokalnaOsPrawnejPkd']
REPORT_NAME  = ['F' => ['1' => 'BIR11OsFizycznaDzialalnoscCeidg', '2' => 'BIR11OsFizycznaDzialalnoscRolnicza', '3' => 'BIR11OsFizycznaDzialalnoscPozostala', '4' => 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108'], 'LF' => 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108', 'P' => 'BIR11OsPrawna', 'LP' => 'BIR11JednLokalnaOsPrawnej']
REPORT_PREFIX  = ['BIR11OsPrawna' => 'praw_', 'BIR11JednLokalnaOsPrawnej' => 'lokpraw_']
REPORT_TO_NUMBER_LOCAL  = ['BIR11OsPrawna' => 'praw_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108' => 'fiz_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscPozostala' => 'fiz_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscRolnicza' => 'fiz_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscCeidg' => 'fiz_adSiedzNumerNieruchomosci']
$cache  : array<string|int, self>
$params  : array<string|int, mixed>
$sessionId  : string
$streamContext  : resource
__doRequest()  : string
{@inheritdoc}
endSession()  : void
End session - logout.
getAddressToAction()  : string
Get address to action.
getAdvanceData()  : void
Get data for record fields from gus reports.
getData()  : array<string|int, mixed>
Get data from API.
getInstance()  : self
Get instance.
parseResponse()  : array<string|int, mixed>
Parsing response.
search()  : array<string|int, mixed>
Search entity.
startSession()  : void
Start session - login.
getReportName()  : string
Undocumented function.

Constants

CONFIG

public array<string|int, string> CONFIG = ['apiKey' => 'd2df36a7394c432e88ea', 'addressToService' => 'https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc', 'addressToWsdl' => 'https://wyszukiwarkaregon.stat.gov.pl/wsBIR/wsdl/UslugaBIRzewnPubl-ver11-prod.wsdl']

Client connection details.

HEADER_NAMESPACE

public string HEADER_NAMESPACE = 'http://www.w3.org/2005/08/addressing'

Namespace for header.

PKD_REPORTS

public array<string|int, string> PKD_REPORTS = ['BIR11OsPrawna' => 'BIR11OsPrawnaPkd', 'BIR11OsFizycznaDzialalnoscCeidg' => 'BIR11OsFizycznaPkd', 'BIR11OsFizycznaDzialalnoscRolnicza' => 'BIR11OsFizycznaPkd', 'BIR11OsFizycznaDzialalnoscPozostala' => 'BIR11OsFizycznaPkd', 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108' => 'BIR11OsFizycznaPkd', 'BIR11JednLokalnaOsPrawnej' => 'BIR11JednLokalnaOsPrawnejPkd']

PKD report map.

REPORT_NAME

public array<string|int, mixed> REPORT_NAME = ['F' => ['1' => 'BIR11OsFizycznaDzialalnoscCeidg', '2' => 'BIR11OsFizycznaDzialalnoscRolnicza', '3' => 'BIR11OsFizycznaDzialalnoscPozostala', '4' => 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108'], 'LF' => 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108', 'P' => 'BIR11OsPrawna', 'LP' => 'BIR11JednLokalnaOsPrawnej']

Report names for entity.

REPORT_PREFIX

public array<string|int, string> REPORT_PREFIX = ['BIR11OsPrawna' => 'praw_', 'BIR11JednLokalnaOsPrawnej' => 'lokpraw_']

Variable for mapping report names to value prefix.

REPORT_TO_NUMBER_LOCAL

public array<string|int, string> REPORT_TO_NUMBER_LOCAL = ['BIR11OsPrawna' => 'praw_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscSkreslonaDo20141108' => 'fiz_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscPozostala' => 'fiz_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscRolnicza' => 'fiz_adSiedzNumerNieruchomosci', 'BIR11OsFizycznaDzialalnoscCeidg' => 'fiz_adSiedzNumerNieruchomosci']

Mapping field from report to number local field in record.

Properties

$cache

public static array<string|int, self> $cache = []

Namespace for header.

$params

private array<string|int, mixed> $params

Params.

$sessionId

private string $sessionId

Client session.

$streamContext

private resource $streamContext

Stream context.

Methods

__doRequest()

{@inheritdoc}

public __doRequest(mixed $req, mixed $location, mixed $action[, mixed $version = SOAP_1_2 ][, mixed $oneWay = null ]) : string
Parameters
$req : mixed
$location : mixed
$action : mixed
$version : mixed = SOAP_1_2
$oneWay : mixed = null
Return values
string

endSession()

End session - logout.

public endSession() : void
Return values
void

getAddressToAction()

Get address to action.

public getAddressToAction(string $action) : string
Parameters
$action : string
Return values
string

getAdvanceData()

Get data for record fields from gus reports.

public getAdvanceData(array<string|int, mixed> &$response) : void
Parameters
$response : array<string|int, mixed>
Return values
void

getData()

Get data from API.

public getData(string $type, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$type : string
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

getInstance()

Get instance.

public static getInstance([array<string|int, mixed> $params = [] ]) : self
Parameters
$params : array<string|int, mixed> = []
Return values
self

parseResponse()

Parsing response.

public parseResponse(string $response) : array<string|int, mixed>
Parameters
$response : string
Return values
array<string|int, mixed>

Search entity.

public search(string|null $vatId[, string|null $ncr = null ][, string|null $taxNumber = null ]) : array<string|int, mixed>
Parameters
$vatId : string|null
$ncr : string|null = null
$taxNumber : string|null = null
Return values
array<string|int, mixed>

startSession()

Start session - login.

public startSession() : void
Return values
void

getReportName()

Undocumented function.

private getReportName(string $type, string $silosId) : string
Parameters
$type : string
$silosId : string
Return values
string

        

Search results