Download the PHP package italix/contracts without Composer

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

Italix Contracts

PHP Version

Shared interfaces and foundational classes for Italix libraries, enabling seamless integration between italix/orm, italix/forms, and other compatible libraries.

Installation

Purpose

This package provides the common contracts and building blocks that allow different Italix libraries to work together without tight coupling:

Contents

Interfaces

Interface Description
TableMeta Describes a table/entity with its columns
ColumnMeta Describes a column/field with its type and constraints
RelationMeta Describes a foreign key relationship
RelationalColumnMeta A column that may have FK relations (extends ColumnMeta)
PolymorphicColumnMeta A polymorphic FK column (extends ColumnMeta)
DelegatedTableMeta A table using delegated types pattern (extends TableMeta)

Classes

Class Description
DataContainer Lightweight array-backed data container with array access, iteration, and JSON support

DataContainer

A general-purpose data container that wraps an associative array and provides both array syntax ($c['key']) and a clean method-based API.

Implements ArrayAccess, Countable, IteratorAggregate, and JsonSerializable.

Quick Start

Getting Values

Extracting Data

Modifying Data

Iteration, Counting, and JSON

Extending DataContainer

DataContainer is designed to be extended. The $data property is protected, so subclasses can access it directly:

snake_case Convention

All Italix public methods use snake_case. The methods required by PHP's built-in interfaces (offsetGet, jsonSerialize, getIterator) are implemented as required, with snake_case aliases provided:

PHP interface method snake_case alias
jsonSerialize() json_serialize()
getIterator() get_iterator()

The ArrayAccess methods (offsetGet, offsetSet, offsetExists, offsetUnset) don't need aliases because they are called implicitly via array syntax ($c['key']), not directly. Use get(), set(), has(), and remove() instead.

Complete API Reference

Method Returns Description
__construct(array $data = []) Create with optional initial data
get($key, $default = null) mixed Get value by key, with default
set($key, $value) self Set a value (chainable)
has($key) bool Key exists and is not null
has_key($key) bool Key exists, even if null
remove($key) self Remove a key (chainable)
merge(array $data) self Merge in new data (chainable)
to_array() array Get all data as plain array
only(array $keys) array Get subset of keys
except(array $keys) array Get all data except specified keys
keys() array Get all keys
values() array Get all values
is_empty() bool Check if container has no data
clear() self Remove all data (chainable)
count() int Number of entries (also works with count())
json_serialize() array Get data for JSON encoding
get_iterator() Traversable Get iterator for foreach

Interfaces

Implementing TableMeta

Implementing ColumnMeta

Using with italix/forms

Hierarchy

Requirements

License

Apache-2.0


All versions of contracts with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 italix/contracts contains the following files

Loading the files please wait ...