Download the PHP package rnd-cosoft/api-tools-hal without Composer

On this page you can find all versions of the php package rnd-cosoft/api-tools-hal. 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 api-tools-hal

Laminas HAL

Build Status

🇷🇺 Русским гражданам

Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.

У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.

Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"

🇺🇸 To Citizens of Russia

We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.

One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.

You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

Introduction

This module provides the ability to generate Hypermedia Application Language JSON representations.

Requirements

Please see the composer.json file.

Installation

Run the following composer command:

Alternately, manually add the following to your composer.json, in the require section:

And then run composer update to ensure the module is installed.

Finally, add the module name to your project's config/application.config.php under the modules key:

laminas-component-installer

If you use laminas-component-installer, that plugin will install api-tools-hal as a module for you.

Configuration

User Configuration

This module utilizes the top level key api-tools-hal for user configuration.

Key: renderer

This is a configuration array used to configure the api-tools-hal Hal view helper/controller plugin. It consists of the following keys:

Key: metadata_map

The metadata map is used to hint to the Hal plugin how it should render objects of specific class types. When the Hal plugin encounters an object found in the metadata map, it will use the configuration for that class when creating a representation; this information typically indicates how to generate relational links, how to serialize the object, and whether or not it represents a collection.

Each class in the metadata map may contain one or more of the following configuration keys:

The links property is an array of arrays, each with the following structure:

Key: options

The options key is used to configure general options of the Hal plugin. For now we have only one option available who contains the following configuration key:

System Configuration

The following configuration is present to ensure the proper functioning of this module in a Laminas-based application.

Laminas Events

Events

Laminas\ApiTools\Hal\Plugin\Hal Event Manager

The Laminas\ApiTools\Hal\Plugin\Hal triggers several events during its lifecycle. From the EventManager instance composed into the HAL plugin, you may attach to the following events:

As an example, you could listen to the renderEntity event as follows (the following is done within a Module class for a Laminas module and/or Laminas API Tools API module):

Notes on individual events:

Listeners

Laminas\ApiTools\Hal\Module::onRender

This listener is attached to MvcEvent::EVENT_RENDER at priority 100. If the controller service result is a HalJsonModel, this listener attaches the Laminas\ApiTools\Hal\JsonStrategy to the view at priority 200.

Laminas Services

Models

Laminas\ApiTools\Hal\Collection

Collection is responsible for modeling general collections as HAL collections, and composing relational links.

Laminas\ApiTools\Hal\Entity

Entity is responsible for modeling general purpose entities and plain objects as HAL entities, and composing relational links.

Laminas\ApiTools\Hal\Link\Link

Link is responsible for modeling a relational link. The Link class also has a static factory() method that can take an array of information as an argument to produce valid Link instances.

Laminas\ApiTools\Hal\Link\LinkCollection

LinkCollection is a model responsible for aggregating a collection of Link instances.

Laminas\ApiTools\Hal\Metadata\Metadata

Metadata is responsible for collecting all the necessary dependencies, hydrators and other information necessary to create HAL entities, links, or collections.

Laminas\ApiTools\Hal\Metadata\MetadataMap

The MetadataMap aggregates an array of class name keyed Metadata instances to be used in producing HAL entities, links, or collections.

Extractors

Laminas\ApiTools\Hal\Extractor\LinkExtractor

LinkExtractor is responsible for extracting a link representation from Link instance.

Laminas\ApiTools\Hal\Extractor\LinkCollectionExtractor

LinkCollectionExtractor is responsible for extracting a collection of Link instances. It also composes a LinkExtractor for extracting individual links.

Controller Plugins

Laminas\ApiTools\Hal\Plugin\Hal (a.k.a. "Hal")

This class operates both as a view helper and as a controller plugin. It is responsible for providing controllers the facilities to generate HAL data models, as well as rendering relational links and HAL data structures.

View Layer

Laminas\ApiTools\Hal\View\HalJsonModel

HalJsonModel is a view model that when used as the result of a controller service response signifies to the api-tools-hal module that the data within the model should be utilized to produce a JSON HAL representation.

Laminas\ApiTools\Hal\View\HalJsonRenderer

HalJsonRenderer is a view renderer responsible for rendering HalJsonModel instances. In turn, this renderer will call upon the Hal plugin/view helper in order to transform the model content (an Entity or Collection) into a HAL representation.

Laminas\ApiTools\Hal\View\HalJsonStrategy

HalJsonStrategy is responsible for selecting HalJsonRenderer when it identifies a HalJsonModel as the controller service response.


All versions of api-tools-hal with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0 || ~8.2.0 || ~8.3.0
ext-json Version *
rnd-cosoft/api-tools-api-problem Version ^1.6.0
laminas/laminas-eventmanager Version ^3.4.0
laminas/laminas-filter Version ^2.13.0
laminas/laminas-http Version ^2.15.1
laminas/laminas-hydrator Version ^3.2.0 || ^4.3.0
laminas/laminas-mvc Version ^3.3.0
laminas/laminas-paginator Version ^2.11
laminas/laminas-stdlib Version ^3.10.1
laminas/laminas-uri Version ^2.9.1
laminas/laminas-view Version ^2.14.0
laminas/laminas-zendframework-bridge Version ^1.1
psr/link Version ^1.0 || ^2.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 rnd-cosoft/api-tools-hal contains the following files

Loading the files please wait ....