Download the PHP package flowpack/neos-dimensionresolver without Composer

On this page you can find all versions of the php package flowpack/neos-dimensionresolver. 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 neos-dimensionresolver

Flowpack Neos Content Dimension Resolver

Introduction

For a general overview over content dimension, please refer to the respective sections in the Neos manual.

This package enhances the default capabilities of detecting and linking to dimension presets by providing both new features and extension points.

Installation

Dimension Configuration

The available dimensions and presets can be configured via settings:

Note: The uriSegment configuration option provided by default via Neos is still supported but disencouraged.

Preset resolution

Using this package, content dimension presets can be resolved in different ways additional to the "classic" way of using an URI path segment. Thus further configuration and implementation options have been added.

The dimension resolver comes with three basic resolution modes which can be combined arbitrarily and configured individually.

URI path segment based resolution

The default resolution mode is uriPathSegment. As by default in previous versions, it operates on an additional path segment, e.g. https://domain.tld/{language}_{market}/home.html. These are the configuration options available:

With the given configuration, URIs will be resolved like domain.tld/{language}-{market}/home.html

Note: An arbitrary number of dimensions can be resolved via uriPathSegment. The other way around, as long as no content dimensions resolved via uriPathSegment are defined, URIs will not contain any prefix.

The default preset can have an empty resolutionValue value. The following example will lead to URLs that do not contain en if the en_US preset is active, but will show the resolutionValue for other languages that are defined as well:

The only limitation is that all resolution values must be unique across all dimensions that are resolved via uriPathSegment. If you need non-unique resolution values, you can switch support for non-empty dimensions off:

Subdomain based resolution

Another resolution mode is subdomain. This mode extracts information from the first part of the host and adds it respectively when generating URIs.

With the given configuration, URIs will be resolved like {language}.domain.tld/home.html

Note: Only one dimension can be resolved via subdomain.

Top level domain based resolution

The final resolution mode is topLevelDomain. This modes extracts information from the last part of the host and adds it respectively when generating URIs.

With the given configuration, URIs will be resolved like domain.{market}/home.html

Note: Only one dimension can be resolved via top level domain.

Custom resolution

There are planned extension points in place to support custom implementations in case the basic ones do not suffice.

Defining custom resolution components

Each resolution mode is defined by two components: An implementation of Neos\Neos\Http\ContentDimensionDetection\ContentDimensionPresetDetectorInterface to extract the preset from an HTTP request and an implementation of Neos\Neos\Http\ContentDimensionLinking\ContentDimensionPresetLinkProcessorInterface for post processing links matching the given dimension presets.

These can be implemented and configured individually per dimension:

If your custom preset resolution components do not affect the URI, you can use the Flowpack\Neos\DimensionResolver\Http\ContentDimensionLinking\NullDimensionPresetLinkProcessor implementation as the link processor.

Note:

If you want to replace implementations of one of the basic resolution modes, you can do it this way, too.

Completely replacing resolution behaviour

The described configuration and extension points assume that all dimension presets can be resolved independently. There may be more complex situations though, where the resolution of one dimension depends on the result of the resolution of another. As an example, think of a subdomain (language) and top level domain (market) based scenario where you want to support domain.fr, domain.de, de.domain.ch, fr.domain.ch and it.domain.ch. Although you can define the subdomain as optional, the default language depends on the market: domain.de should be resolved to default language de and domain.fr should be resolved to default language fr. Those complex scenarios are better served using individual implementations than complex configuration efforts.

To enable developers to deal with this in a nice way, there are predefined ways to deal with both detection and link processing.

Detection is done via an HTTP middleware that can be replaced via configuration:

Link processing is done by the Flowpack\Neos\DimensionResolver\Http\ContentSubgraphUriProcessorInterface. To introduce your custom behaviour, implement the interface and declare it in Objects.yaml as usual in Flow.

Note: Please refer to the default implementations for further hints and ideas on how to implement resolution.


All versions of neos-dimensionresolver with dependencies

PHP Build Version
Package Version
Requires ext-mbstring Version *
neos/neos Version ^8.0
neos/flow Version ^8.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 flowpack/neos-dimensionresolver contains the following files

Loading the files please wait ....