Download the PHP package juanchosl/datatransfer without Composer

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

DataTransfer

Description

A small, lightweight utility to read values and properties from distinct sources using the same methodology and convert it to a standard DTO. Include a second tool that can convert any of DTOs to any of the know formats, creating a simple format converter from format A to format B.

Install

How use it

Load composer autoload and use it

Data Transfer Objects

Using the provided Factory

The $element parameter can be:

Magic CREATE method

Today is not possible detect a INI, YAML or CSV string, can use filepath with the rigth extension, but not this string types

Using a filepath

Open and convert the contents included into file, alternatively you can specify the Format if the extension is not knowed

Using a string

Detect and convert the contents included into string (json encoded, serialized object or array, xml), alternatively you can specify the Format if the type is YAML, CSV or INI

Using a trasversable element

Detect and convert the trasversable element (object or array)

Using a specific repository

Alternative you can use the distincts repositories

Available origins and repositories

Type Compatibility Reader
Array filepath | array | string from array serialized ArrayDataTransfer
CSV filepath | array of lines | string CsvDataTransfer(,) or ExcelCsvDataTransfer(;)
INI filepath | string IniDataTransfer
JSON filepath | string JsonDataTransfer
stdClass filepath | object | string from object serialized ObjectDataTransfer
XML filepath | string | SimpleXmlElement XmlDataTransfer
YAML filepath | string YamlDataTransfer

The $element parameter needs to be the required type for the selected repo

Is more efective use a magic factory in order to avoid know the type of the original data, and you can change it with no need to adapt your existing code.

The resultant $dto variable is a recursive data transfer object, iterable, countable, clonable and json serializable

Use data

TODO

When we need to use a CSV, YAML or INI contents to transform to a DTO, we need to use the native DataTransfer, today is not possible detect it as distinct of string or array

Data Converters

You can convert any DataTransferObject to a standar format, as:

Using the provided Factory

Using a specific converter

Alternative you can use the distincts converters

The available converters are:


All versions of datatransfer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-mbstring Version *
ext-json Version *
juanchosl/exceptions Version 1.0.*
juanchosl/validators Version 1.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 juanchosl/datatransfer contains the following files

Loading the files please wait ....