2017 © Pedro Peláez
 

database db

Helix Database Stuff

image

hfw/db

Helix Database Stuff

  • Tuesday, September 5, 2017
  • by yoosefi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Database storage and access using annotations., (*1)

, (*2)

Documentation: https://hfw.github.io/db, (*3)

Class Annotations

/**
 * @record my_table
 */
class MyClass implements Helix\DB\EntityInterface, ArrayAccess {

    use Helix\DB\AttributesTrait;

    /**
     * "id" is a required column.
     * @column
     * @var int
     */
    protected $id = 0;

    /**
     * @column
     * @var string
     */
    protected $myColumn;

    /**
     * @eav foo_eav
     * @var array
     */
    protected $attributes;

    /**
     * @return int
     */
    final public function getId() {
        return $this->id;
    }

}

  • Columns must be named the same as their respective properties.
  • EAV tables must have 3 columns: entity, attribute, and value.
    • entity must be a foreign key.
    • entity and attribute must form the primary key.

Interface Annotations

Interfaces can be annotated to act as junctions., (*4)

/**
 * @junction foo_bar
 * @foreign foo_id Foo
 * @foreign bar_id Bar
 */
interface FooBar { }
  • The interfaces don't have to be implemented.
  • The referenced classes may be identical.

Supported Drivers

  • MySQL
  • SQLite

Class Diagram

, (*5)

The Versions

05/09 2017

dev-overhaul

dev-overhaul https://github.com/hfw/db

Helix Database Stuff

  Sources   Download

MIT

The Requires

 

database activerecord active record eav junction

02/12 2016

dev-master

9999999-dev https://github.com/hfw/db

Helix Database Stuff

  Sources   Download

MIT

The Requires

 

database activerecord active record eav junction

21/11 2016

v1.0.9

1.0.9.0 https://github.com/hfw/db

Helix Database Stuff

  Sources   Download

MIT

The Requires

 

database activerecord active record eav junction

21/11 2016

v0.1.0-rc.9

0.1.0.0-RC9 https://github.com/hfw/db

Helix Database Stuff

  Sources   Download

MIT

The Requires

 

database activerecord active record eav junction

01/10 2016

v0.1.0-rc.8

0.1.0.0-RC8 https://github.com/hfw/db

Helix Database Stuff

  Sources   Download

MIT

The Requires

 

database activerecord active record eav junction