Download the PHP package webparking/logic4-client without Composer

On this page you can find all versions of the php package webparking/logic4-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package logic4-client

Packagist License Github stars Downloads

Logic4 client

Please note that this API client is not created or maintained by Logic4. For questions about Logic4 or it's API please contact Logic4 support.

Installation

You can install the package via composer:

Configuration

In order to use the Logic4 API, you need to configure the AccessTokenManager with your credentials. You can do this by calling the configure method on the AccessTokenManager instance.

The following configuration options are required

The access token is automatically refreshed when it expires and stored in the cache. The cache object is set using the $cache property on the AccessTokenManager class and should implement the Psr\SimpleCache\CacheInterface interface.

After configuring the AccessTokenManager you can use any request class in your application without having to worry about the access token and other middleware.

Example configuration

Laravel integration

Integration with Laravel is easily done by configuring the AccessTokenManager after it has been resolved by the Laravel IoC Container.

Add the following code to your AppServiceProvider class:

This makes it possible to directly use any request class in your application without having to worry about the access token and other middleware.

Example request

Testing

You can test the package by running ./vendor/bin/phpunit in the root of the project. Make sure install the dependencies by running composer install before running the tests.

Preventing stray requests

If you would like to ensure that all requests sent via the client have been mocked throughout your individual test or complete test suite, you can call the preventStrayRequests method on the \Webparking\Logic4Client\ClientFactory class. After calling this method, any requests that do not have a corresponding mock will throw an exception rather than making the actual request:

Contributing

Please report any issue you find in the issues page. Pull requests are more than welcome.

Generating endpoints

The endpoints can automatically be generated using the generate command. This command will generate a request class for each endpoint and a client class that can be used to instantiate the request classes.

License

The MIT License (MIT). Please see License File for more information.


All versions of logic4-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.8
nesbot/carbon Version ^2.71
psr/simple-cache Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webparking/logic4-client contains the following files

Loading the files please wait ....