Download the PHP package koba/informat-php-client without Composer

On this page you can find all versions of the php package koba/informat-php-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 informat-php-client

Informat API Wrapper

PHP client library for the Informat school software API. This client allows you to

Installation

You can simply install the library through composer:

The library also requires a PSR-17 and PSR-18 implementation. If these are not yet included in your project, you can install Guzzle 7 to meet this requirement (although any other implementation will work fine):

Usage

The library is built on 3 main 'layers':

The code below is a quick example of how you can fetch students

This will return an array of Student objects, which has typed (and documented) properties.

Scopes

Creating the Informat object can be done fairly easily as demonstrated above. The scopes parameter might need some extra explanation.

In the example above you see we pass an AllScopesStrategy object to the constructor. This is a way to let the API client know which scopes we want to request, which directly impacts which API calls you will be authorized to execute. The library supplies the AllScopesStrategy, which will request all possible scopes and the SpecificScopesStrategy, which allows you to specify the scopes that will be requested. Both require you to pass the institute numbers for all schools you wnat to access as parameters. The latter might be desirable if your client isn't authorized for all scopes or you want to limit the functionality for security reasons.

You can also create your own scope strategy by implementing the ScopeStrategyInterface.

Calls

There are a couple of 'rules' that should be followed when managing calls

An example to illustrate these points:

Advanced

The Informat object has some advanced setup options. You can pass an AccessTokenManagerInterface object, which allows you to implement your own access token caching solution. The rest of the constructor can be used to pass a psr-18 client interface and psr-17 HTTP response factories. If these options are omitted, the library will autodiscover any suitable implementations.


All versions of informat-php-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1.0
psr/http-client-implementation Version *
psr/http-factory-implementation Version *
php-http/discovery Version ^1.19
json-mapper/json-mapper Version ^2.21
symfony/http-client Version ^7.1
nyholm/psr7 Version ^1.8
psr/http-client Version ^1.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 koba/informat-php-client contains the following files

Loading the files please wait ...