Download the PHP package responsive-sk/slim4-themes without Composer

On this page you can find all versions of the php package responsive-sk/slim4-themes. 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 slim4-themes

Slim4 Themes

Theme handling for Slim 4 applications.

Version 2.0 Changes

Version 2.0 introduces a new approach to theme handling using Dependency Injection (DI) instead of middleware. This provides several advantages:

  1. Separation of concerns: Theme handling is a cross-cutting concern that should be handled at the container level, not in the HTTP request pipeline.
  2. Performance: DI-based theme handling is more efficient because it doesn't require processing the request for every request.
  3. Flexibility: DI-based theme handling allows you to use the theme in any part of your application, not just in the HTTP request pipeline.
  4. Testability: DI-based theme handling is easier to test because you can mock the theme provider.

Installation

Usage

1. Register the services

Using PHP-DI

Using Symfony Container

2. Add the middleware

3. Use the theme in your application

Components

ThemeResolver

The ThemeResolver class is responsible for resolving the theme based on the request, cookies, or default theme.

ThemeProvider

The ThemeProvider class is responsible for providing the theme from the container.

RequestAwareMiddleware

The RequestAwareMiddleware class is responsible for making the request available to the ThemeProvider.

ThemeServiceProvider

The ThemeServiceProvider class is responsible for registering theme services in the container.

Migrating from Version 1.x

If you're migrating from version 1.x, here are the main changes:

  1. Replace ThemeMiddleware with RequestAwareMiddleware:

  2. Get the theme from the container instead of the request attribute:

  3. Register the new services in your container:

License

MIT


All versions of slim4-themes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
slim/slim Version ^4.0
responsive-sk/slim4-root Version ^1.0
psr/http-message Version ^1.0 || ^2.0
psr/http-server-middleware Version ^1.0 || ^2.0
psr/log Version ^1.0 || ^2.0 || ^3.0
psr/container Version ^1.0 || ^2.0
twig/twig 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 responsive-sk/slim4-themes contains the following files

Loading the files please wait ...