Download the PHP package foobarfighters/zend-server-web-api without Composer
On this page you can find all versions of the php package foobarfighters/zend-server-web-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download foobarfighters/zend-server-web-api
More information about foobarfighters/zend-server-web-api
Files in foobarfighters/zend-server-web-api
Package zend-server-web-api
Short Description PHP wrapper for the Zend Server Web API
License MIT
Informations about the package zend-server-web-api
Zend Server Web API
A Guzzle based wrapper for (a part of) the Zend Server Web API. Has no dependencies with any framework. Check the traits in ZendServer/WebApi/Client/Core/Method for the endpoints that are currently supported.
Installation
The package can be installed with composer:
`
Usage
When making use of the ClientFactory the Zend Server credentials can be passed as an array. Alternatively these values can be passed directly into the constructor of the client when instantiating it manually. ``
Core Client
The core client is responsible for making the API request, returning the response as an associative array or throwing exceptions if anything goes wrong.
``
Extended Client
The extended client decorates the core client and maps the raw API output to data models. These models offer additional benefits like filtering, date parsing and autocompletion in IDE's.
``
Custom Guzzle
A custom Guzzle client can be passed to either the ClientFactory, or the Client class. This can be useful for adding headers, middleware or custom handlers. See the examples bootstrap file for how to add Monolog logging middleware.
``
Examples
For more examples see the examples folder.
` The examples can make actual calls to a Zend Server instance or be run either in mocked mode.
Mock mode
When running an example in mocked mode all the API responses are injected from a set of json files instead of connecting to a Zend Server instance.
Live mode
Note that in live mode:
- ZS credentials need to be stored in vhost environmentals or alter the config array in the bootstrap file.
- Requests/responses are logged in the logs folder. This requires write access.
All versions of zend-server-web-api with dependencies
ext-json Version *
ext-libxml Version *
ext-simplexml Version *
ext-zip Version *
guzzlehttp/guzzle Version ^7.3