Download the PHP package brandembassy/slim-nette-extension without Composer

On this page you can find all versions of the php package brandembassy/slim-nette-extension. 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 slim-nette-extension

CircleCI Total Downloads Latest Stable Version

Nette Extension for integration of SLIM for API

This extension brings the power of Slim for applications using Nette DI. It enables you to easily work with Slim middleware stack and develop your API easily.

The general idea has been discussed in this article. (Czech language)

Philosophy

Single Responsibility

The main idea is to delegate responsibilities of the code handling requests to separated middlewares. For example:

How middlewares in Slim work is described here.

Easy configuration

Empowered by Nette DI and it's neon configuration syntax this package provides powerful and easy way to define your API.

Usage

So let's start!

Extension

Now register new extension by adding this code into your config.neon:

First API endpoint

Now let's say you want to make a REST endpoint creating channels, [POST] /new-api/2.0/channels

You need to define in parameters.api section in config.neon.

Both services and middlewares must be registered services in DI Container.

You can also reference the named service by it's name.

See tests/SlimApplicationFactoryTest.php and tests/config.neon for more examples.

Execution

Now you can simply get SlimApplicationFactory class from your DI Container (or better autowire it), create app and run it.


All versions of slim-nette-extension with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
nette/neon Version ^3.0
slim/slim Version ^3.12
nette/utils Version ^3.0
nette/di Version ^3.0
psr/http-message 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 brandembassy/slim-nette-extension contains the following files

Loading the files please wait ....