2017 © Pedro Peláez
 

library orangedb

Readonly Filesystem Database | Object-File Mapping

image

davidbadura/orangedb

Readonly Filesystem Database | Object-File Mapping

  • Monday, May 7, 2018
  • by DavidBadura
  • Repository
  • 2 Watchers
  • 1 Stars
  • 21 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 5 % Grown

The README.md

OrangeDb

OrangeDB is a library about high performance transition of master data from yaml/json to objects., (*1)

Build Status Scrutinizer Code Quality Code Coverage, (*2)

Installation

You can easily install this package over composer, (*3)

composer require 'davidbadura/orangedb'

Example

Model

<?php

use DavidBadura\OrangeDb\Annotation as OD;

/**
 * @OD\Document("character")
 */
class Character {

    /**
     * @OD\Type("string")
     */
    private $name;

    /**
     * @OD\Type("integer")
     */
    private $age;

    /**
     * @OD\ReferenceMany("Character")
     */
    private $children;

    public function getName(): string 
    {
        return $this->name;
    }

    public function getAge(): int 
    {
        return $this->age;
    }

    public function getChildren(): array 
    {
        return $this->children;
    }
}

Data

# /var/cache/orangedb/character/sarah.yaml

name: Sarah Connor
age: 32
children: ['john']

# /var/cache/orangedb/character/john.yaml

name: John Connor
age: 8
children: []

Usage

<?php

use DavidBadura\OrangeDb\DocumentManager;
use DavidBadura\OrangeDb\Adapter\YamlAdapter;

$manager = new DocumentManager(new YamlAdapter(__DIR__.'/data'), __DIR__.'/var/cache/orangedb');

$character = $manager->find(Character::class, 'sarah');

echo $character->getName(); // Sarah Connor
echo $character->getAge(); // 32

echo count($character->getChildren()); // 1
echo $character->getChildren()[0]->getName(); //John Connor

The Versions

07/05 2018

dev-master

9999999-dev

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

03/05 2018

1.0-alpha10

1.0.0.0-alpha10

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

03/05 2018

1.0-alpha9

1.0.0.0-alpha9

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

03/05 2018

1.0-alpha8

1.0.0.0-alpha8

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

28/04 2018

1.0-alpha7

1.0.0.0-alpha7

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

26/04 2018

1.0-alpha6

1.0.0.0-alpha6

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

22/04 2018

1.0-alpha5

1.0.0.0-alpha5

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

22/04 2018

1.0-alpha4

1.0.0.0-alpha4

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

25/03 2016
25/03 2016

dev-naming-strategy

dev-naming-strategy

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation

23/02 2016

1.0-alpha1

1.0.0.0-alpha1

Readonly Filesystem Database | Object-File Mapping

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

database filesystem json yaml annotation