Download the PHP package monkeyscloud/monkeyslegion-resources without Composer

On this page you can find all versions of the php package monkeyscloud/monkeyslegion-resources. 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 monkeyslegion-resources

MonkeysLegion Resources

API Resources & Transformers for MonkeysLegion — PHP 8.4 property hooks, JSON:API spec, attribute-driven field control, pagination, and OpenAPI schema generation.

PHP 8.4+

Installation

Features

Feature Description
Dual-mode resources PHP 8.4 property hooks and classic method-based
JSON:API compliance Full {type, id, attributes, relationships, links, meta} envelope
Attribute-driven #[Expose], #[Hidden], #[Groups], #[Computed], #[When], #[WhenLoaded]
Sparse fieldsets ?fields[users]=name,email
Includes ?include=roles,orders
Pagination Integrates with monkeyslegion-pagination + offset/cursor/simple
OpenAPI generation #[ApiField] → OpenAPI 3.1 schemas via monkeyslegion-openapi
Serializer bridge Optional delegation to monkeyslegion-serializer
CLI generator php ml make:resource UserResource --json-api

Quick Start

Property-Hook Style (PHP 8.4)

Method-Based Style (Classic)

JSON:API Resource

Controller Usage

OpenAPI Schema Generation

Serializer Bridge

CLI Generator

Attributes Reference

Attribute Target Description
#[Expose(name?)] Property Include field in output, optionally rename
#[Hidden] Property Exclude field from output
#[Groups(['...'])] Property / Class Serialization groups
#[Computed] Property Virtual field (no backing entity prop)
#[When(condition)] Property Include only if method returns true
#[WhenLoaded(relation)] Property Include only if relation is loaded on entity
#[ApiField(...)] Property OpenAPI type, format, description, example

Collection Interface

Both ResourceCollection and JsonApiCollection implement ResourceCollectionInterface:

Dependencies

Package Required Purpose
monkeyscloud/monkeyslegion-http PSR-7 JsonResponse
monkeyscloud/monkeyslegion-di Dependency injection
monkeyscloud/monkeyslegion-pagination Pagination integration
monkeyscloud/monkeyslegion-openapi OpenAPI schema generation
monkeyscloud/monkeyslegion-serializer 💡 Suggested Advanced normalization via SerializerBridge
monkeyscloud/monkeyslegion-cli 💡 Suggested make:resource CLI command

License

MIT © MonkeysCloud Team


All versions of monkeyslegion-resources with dependencies

PHP Build Version
Package Version
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 monkeyscloud/monkeyslegion-resources contains the following files

Loading the files please wait ...