Download the PHP package flyokai/data-mate without Composer

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

flyokai/data-mate

User docs → AGENTS.md

The DTO foundation of the Flyokai framework — Solid/Draft/GreyData states, identity, enums, and collections.

data-mate defines the contract every Data Transfer Object in Flyokai obeys. It pairs the safety of constructor-validated immutables (Solid) with the flexibility of dynamic schemas (Draft, GreyData), and it standardises identity (HasId / HasAltId), enum helpers, and item collections so the rest of the framework can treat data uniformly.

It is built on top of cuyz/valinor for type-safe deserialization.

Features

Installation

Quick start

A Solid DTO (strict, immutable)

A Draft / Solid pairing

Identity

The data-state model

Marker Mutability Construction Use it for
Solid Immutable, public readonly props Constructor, validated Domain objects, repositories return these
Draft Mutable, flexible Same DTO class as Solid but relaxed Input staging, partial updates
GreyData Dynamic key/value Backed by $data array API payloads, third-party blobs

fromArray() uses Valinor for tolerant deserialisation; cloneWith() goes through the constructor for strict validation.

toArray() skips properties that were never assigned (undefined ≠ explicit null). toDbRow() builds on top of it and JSON-encodes any remaining array values — so ['data' => ['k' => 'v']] becomes ['data' => '{"k":"v"}'].

GreyData

GreyDataTrait implements a path-aware key/value bag for objects whose schema is dynamic:

Enums

LCStringEnumTrait lower-cases input before lookup; UCStringEnumTrait upper-cases.

Collections (ItemJar)

API surface

Class / Trait Purpose
Dto Core interface
DtoTrait Reflection-based Valinor implementation
Solid / Draft / GreyData State markers
HasId / HasAltId / HasIdDto Identity
EnumTrait, StringEnumTrait, IntEnumTrait, LCStringEnumTrait, UCStringEnumTrait Enum helpers
ItemJar, JarTrait Type-safe collections
ConfigJar, DdlTable, DdlTableJar Built-in DTOs
Assertions assertNotNull, assertPositiveInt, assertPositiveFloat
ValidationException, InvalidEntity Errors
dtoMapper(...) Cached configured Valinor TreeMapper

Gotchas

See also

License

MIT


All versions of data-mate with dependencies

PHP Build Version
Package Version
Requires amphp/serialization Version ^1
cuyz/valinor Version ^1
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 flyokai/data-mate contains the following files

Loading the files please wait ...