vdmi/afas-client

There is no license information available for the latest version (dev-master) of this package.

Afas client for an easy soap connection.

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 1

Type:package

dev-master 2017-04-04 10:36 UTC

This package is not auto-updated.

Last update: 2024-05-03 17:50:41 UTC


README

AfasClient is a package to make easy soap requests. For now this only supports NuSoap requests and removes NTLM authentication and CURL login. Later on this wil be configurable.

Usage

First you have to "configure" AfasClient to make a call. You can do this by adding the information in an array in a new AfasClient object.

$this->afas = new AfasClient([
      'urlBase' => 'https://example.com/profitservices/',
      'environmentId' => 'YourEnviromentId',
      'useWSDL' => TRUE,
      'userId' => 'YourUserId',
      'password' => 'YourPassword',
    ]);

To make the call you have to construct a query. This will be done by chaining functions. The functions you can use are:

  • range
  • filter
  • orderBy
  • option
$query = $this->afas->get('some_connector')
      ->range(10, 10) // Take 10, Skip 10.
      ->filter('title', 'WIP:%', AfasClient::OP_STARTS_WITH) // Title starts with "WIP:".
      ->orderBy('title', AfasClient::OP_ASC) // Order by title ascending.
      ->option('Outputmode', AfasClient::GET_OUTPUTMODE_ARRAY) // Return array.

Finnaly you want to make the call.

$result = $query->execute();

Installation

You can install this package with composer by executing $ composer install vdmi/afas-client.