2017 © Pedro Peláez
 

library slick

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

image

cimrie/slick

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  • Friday, May 5, 2017
  • by CImrie
  • Repository
  • 1 Watchers
  • 0 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 21 Versions
  • 0 % Grown

The README.md

slick

Doctrine ODM Fluent Metadata Class Implementation. Inspired by laravel-doctrine/fluent. Integrates seamlessly with cimrie/odm., (*1)

Laravel Setup

Add CImrie\Slick\SlickServiceProvider::class to the 'providers' section of config/app.php. Follow the instructions for cimrie/odm., (*2)

In config/odm.php set 'meta' to CImrie\Slick\Mapping\SlickDriver::class For each manager in config/odm.php specify a 'mappings' array like so:, (*3)

<?php

return [
    'managers' => [

        'default' => [
            // ...

            'meta'      => env('DOCTRINE_METADATA', \CImrie\Slick\Mapping\SlickDriver::class),
            'mappings'  => [
               MyCustomMappingClass::class 
            ]

            // ...
        ]
    ]
];

Usage

To set up your mapping files, you should extend one of the following classes:, (*4)

  • Normal Documents: CImrie\Slick\Mapping\DocumentMapping::class,
  • Embedded Documents: CImrie\Slick\Mapping\EmbeddedMapping::class,
  • Mapped Superclass Documents: CImrie\Slick\Mapping\MappedSuperclassMapping::class

In each of the mapping files you will need to specify a mapFor and a map(Slick $builder) method implementaton. mapFor should simply return the class name of the document you wish to map., (*5)

map(...) should make use of the $builder variable given in order to specify its mapping. For example:, (*6)

<?php

use \Tests\Model\Documents\User;
use CImrie\Slick\Slick;

class CustomMapping extends \CImrie\Slick\Mapping\DocumentMapping
{
    public static function mapFor(){
        return User::class;
    }

    public function map(Slick $builder)
    {
        $builder->id();
        $builder->string('name');
        $builder->string('email')->unique();
        // alternatively add the unique constraint manually
        //... $builder->index()->key('email')->unique();

        $builder->date('joinedAt');
    }
}

The Versions

05/05 2017

dev-master

9999999-dev

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

05/05 2017

v0.2.17

0.2.17.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/03 2017

v0.2.16

0.2.16.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/03 2017

v0.2.15

0.2.15.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

14/03 2017

v0.2.14

0.2.14.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

10/03 2017

v0.2.13

0.2.13.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

10/03 2017

v0.2.12

0.2.12.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

10/03 2017

dev-develop

dev-develop

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

10/03 2017

v0.2.11

0.2.11.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

15/02 2017

v0.2.10

0.2.10.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

15/02 2017

v0.2.9

0.2.9.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/02 2017

v0.2.8

0.2.8.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/02 2017

v0.2.7

0.2.7.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/02 2017

v0.2.6

0.2.6.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/02 2017

v0.2.5

0.2.5.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/02 2017

v0.2.4

0.2.4.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/02 2017

v0.2.3

0.2.3.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

01/02 2017

v0.2.2

0.2.2.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

30/01 2017

v0.2.1

0.2.1.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

30/01 2017

v0.2.0

0.2.0.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires

29/01 2017

v0.1.0

0.1.0.0

Fluent ODM Metadata Builder for cimrie/odm, the FW Integration package for Doctrine MongoDB ODM.

  Sources   Download

MIT

The Requires

 

The Development Requires