Provided factories

This component provides a number of factories for use with PSR-11, in order to generate fully configured instances for your use.

Hal\HalResponseFactoryFactory

If you want to use a different PSR-7 implementation for the response and stream, provide services for Psr\Http\Message\ResponseInterface and Psr\Http\Message\StreamInterface, as described above.

Hal\LinkGeneratorFactory

Hal\LinkGenerator\ExpressiveUrlGeneratorFactory

Hal\LinkGenerator\UrlGenerator

You can either define an alternate alias, or map the UrlGenerator service directly to a factory that will return a valid instance.

Hal\Metadata\MetadataMapFactory

This service uses the Hal\Metadata\MetadataMap key of the config service in order to configure and return a Hal\Metadata\MetadataMap instance. It expects that value to be an array of elements, each with the following structure:

[
    '__class__' => 'Fully qualified class name of an AbstractMetadata type',
    // additional key/value pairs as required by the metadata type.
]

The additional pairs are as follows:

If you have created custom metadata types, you can extend this class to support them. Create create<type>(array $metadata) methods for each type you wish to support, where <type> is your custom class name, minus the namespace.

Hal\ResourceGeneratorFactory

If you wish to use a container implementation other than the Zend\Hydrator\HydratorPluginManager, either register it under that service name, or create an alternate factory.