2017 © Pedro Peláez
 

library restructr

PHP 5.5+ domain component foundation

image

jgswift/restructr

PHP 5.5+ domain component foundation

  • Monday, January 19, 2015
  • by jgswift
  • Repository
  • 1 Watchers
  • 0 Stars
  • 124 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

restructr

domain component foundation, (*1)

Build Status Scrutinizer Code Quality Latest Stable Version License, (*2)

Installation

Install via cli using composer:, (*3)

php composer.phar require jgswift/restructr:0.1.*

Install via composer.json using composer:, (*4)

{
    "require": {
        "jgswift/restructr": "0.1.*"
    }
}

Dependency

Description

restructr provides a set of foundational component abstractions in order to facilitate domain driven development in PHP. With no exception, the component foundation classes are composed at compile-time by traits, allowing a flexible approach that requires little imposition on an already existing domain model. restructr provides these domain driven abstractions from both array-first or object-first perspectives. restructr assumes very little about any given domains implementation and allows significant customization of existing functionality., (*5)

Component Abstractions

  • Entity - A single identifiable component
  • Collection - A collection of Entity components
  • ValueArray - An immutable ArrayAccess (offsetGet, offsetSet, etc..)
  • ValueObject - An immutable ObjectAccess (__get, __set, etc..)
  • CollectionEntity - An Entity component that also accepts/serializes an inner Collection
  • CollectionIterator - A Collection of non-accessable but iterable Entity components.
  • EntityIterator - A Entity of non-accessable but iterable domain data

As mentioned above, it is possible to include these concepts into an already existing domain without extending the provided abstractions. Nearly all abstractions are provided as composable traits that may be used or combined in any number of ways., (*6)

Trait Extensions

These traits are included to customize domain implementations in various ways. Some of these are foundational to the provided component abstractions, while others may be excluded or included on a per-domain basis., (*7)

  • ArrayAccess - SPL ArrayAccess implementation using local domain data
  • ArrayAggregate - SPL IteratorAggregate implementation using local domain data
  • ArrayAttributable - ArrayAccess key restraints as defined by getAttributes method
  • ArrayEnumerable - Enumerable implementation to retrieve local domain data
  • ArrayEnumerableAggregate - SPL IterateAggregate implementation using Enumerable data
  • ArrayImmutable - ArrayAccess implementation that disallows mutation (offsetSet, offsetUnset)
  • ArrayIterator - SPL Iterator implementation using local domain data
  • Countable - SPL Countable implementation using local domain data
  • ObjectAccess - Object magic implementation based on ArrayAccess trait
  • ObjectAttributable - ObjectAccess property restraints as defined by getAttributes method
  • ObjectEnumerable - ArrayEnumerable alias
  • ObjectImmutable - ObjectAccess implementation that disallows property mutation (__set, __unset)
  • RecursiveArrayIterator - SPL RecursiveIterator implementation that uses RecursiveArrayIterator from SPL
  • RecursiveIterator - Minimal SPL RecursiveIterator implementation
  • RecursiveSerializer - Enumerable implementation that recursively converts domain data to an array

The Versions

19/01 2015

dev-master

9999999-dev

PHP 5.5+ domain component foundation

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

php trait interface ddd domain driven development

19/01 2015

0.1.22

0.1.22.0

PHP 5.5+ domain component foundation

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

php trait interface ddd domain driven development

15/01 2015

0.1.1

0.1.1.0

PHP 5.5+ domain driven development component foundation

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

php trait interface ddd domain driven development