drwrf/mismatch

a simple library for complex types

dev-master 2014-09-30 03:16 UTC

This package is not auto-updated.

Last update: 2024-04-22 23:28:16 UTC


README

    ╔██╗    ███╗   ███╗██╗███████╗███╗   ███╗ █████╗ ████████╗ ██████╗██╗  ██╗    ██╗
    ██╔╝    ████╗ ████║██║██╔════╝████╗ ████║██╔══██╗╚══██╔══╝██╔════╝██║  ██║    ╚██╗
    ██║     ██╔████╔██║██║███████╗██╔████╔██║███████║   ██║   ██║     ███████║     ██║
    ██║     ██║╚██╔╝██║██║╚════██║██║╚██╔╝██║██╔══██║   ██║   ██║     ██╔══██║     ██║
    ╚██╗    ██║ ╚═╝ ██║██║███████║██║ ╚═╝ ██║██║  ██║   ██║   ╚██████╗██║  ██║    ██╔╝
     ╚═╝    ╚═╝     ╚═╝╚═╝╚══════╝╚═╝     ╚═╝╚═╝  ╚═╝   ╚═╝    ╚═════╝╚═╝  ╚═╝    ╚═╝

     ╚      A  S I M P L E   L I B R A R Y   F O R   C O M P L E X   T Y P E S      ╝

            ╚================================================================╝

            Mismatch is a PHP 5.4 library designed to help you quickly model
            your domain. Take a look, you might like it.

            <?php

            namespace Model;

            use Mismatch;

            class User
            {
                use Mismatch\Model;

                public function init($m)
                {
                    $m->id        = 'Integer';
                    $m->name      = 'String';
                    $m->email     = 'Email';
                    $m->role      = 'BelongsTo[Model\Role]';
                    $m->addresses = 'HasMany[Model\Address]';
                }
            }