Download the PHP package litea/dto without Composer

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

🔀 PHP Data Transfer Library

No need to read the details regarding the motivation behind the DTO?

🚀 Jump right to action!

We tried to solve this conundrum:

And now, with the Data Transfer Library:

📖 Documentation

Bellow you will find the basic usage of this library. For more details see the documentation located in the docs directory of this repository.

Table of contents

About

When dealing with an external data, it usually comes in very generic and dynamic form which is hard to reason about when returning to your code after a while.

This can be solved by so-called Data Transfer Objects (DTOs), which provide object wrapper with static and hopefully typed properties through which you can access the underlying values.

These objects get repetitive very quickly and after second or third DTO you reach for good old CTRL+C, CTRL+V which can be very error prone and hard to maintain.

This is a real-life example of DTO object that helps you to give you better control over the incoming data:

As you can see when you need to maintain dozens of those it becomes very self-evident that there is a place for improvement. That's why we decided to extract some of the common DTO features and provide them in the form of this package.

Installation

The easiest way to install this library is using composer:

Basic usage

Without DTO

Now imagine you use this service multiple times across your application. You need to pay extra attention to not to make mistakes or typos regarding the field namings. Your IDE can't help you here.

With DTO

First of all we need an object, that will represent the data:

Then we fetch the data as usual:

That's it. As you can see, in the simplest form using the DTO object is the matter of defining one class that extends Litea\DataTransfer\DataObject and then calling MyObject::create.

To learn more about available configuration options see the examples.


All versions of dto with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
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 litea/dto contains the following files

Loading the files please wait ....