Download the PHP package themadhenchman/encoder-annotation without Composer

On this page you can find all versions of the php package themadhenchman/encoder-annotation. 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 encoder-annotation

Notice

This library is in beta-status; depending on use-cases or problems found some internal implementations may change. Should it affect persisted data, a method for updating the data-format will be provided.

Purpose

The purpose of this module is to allow PHP itself to infer the desired structure for the encoded data. It will move the description of what the output is supposed to be onto the dataobject itself and negates the need to have dedicated encoderlogic.

Inspiration

This package was inspired by GoLang's JSON-module.

Extensibility

The logic this package provides is split into two parts communicating over a common data-structure.

Any one of those parts is replaceable by a custom implementation catering to encoding/decoding to/from formats other than the one provided(JSON).

It also allows for custom logic during transformation.

Please see the test provided for some illustration.

Deployment

The implementation for encoding and decoding can be composed freely.

This needs to be done in the code using it and as long the extensibility requirements are honoured there shouldn't be any problems.

Otherwise, please file a bug-report.

Using this package you will want to initialize and use the services provided.

Example

Upon an instance of this class being put into the services provided the class will be persisted into

Without having to implement further logic.

This also holds true for more complex items. Collections that are not homomorphic (read holding various datatypes, e.g. [2,'a', new class{}]) are not supported.

The different objects are composable can can stack. The result must not always be a JSON IF the encoder-logic provided creates e.g. XML. You can also encode one object and decode it to another object. Additionally, properties known on the part-object can also be encoded (annotation must take place on the class level though).

An earlier iteration of this (not released) also provided invocations of method-calls. However, this blurred the line between data and logic and will most likely (unless for a very good reason) not be supported going forward.

Encoding into other formats is also on the table (e.g. currently XML is up there as a candidate for implementation). They are subject to time-constraints, though.

The provided attribute-parameter in the annotation is a going to be used there. For the time being that parameter is provided, but not actively used. Feel free to test out implementations using that parameter(e.g. for XML) and provide feedback/PRs/bug-reports.


All versions of encoder-annotation with dependencies

PHP Build Version
Package Version
No informations.
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 themadhenchman/encoder-annotation contains the following files

Loading the files please wait ....