2017 © Pedro Peláez
 

library dao

A shrimp of a DAO support library

image

caridea/dao

A shrimp of a DAO support library

  • Monday, January 29, 2018
  • by doublecompile
  • Repository
  • 1 Watchers
  • 0 Stars
  • 482 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

caridea-dao

Caridea is a miniscule PHP application library. This shrimpy fellow is what you'd use when you just want some helping hands and not a full-blown framework., (*1)

, (*2)

This is its Data Access Object support component. You can use these classes to support DAOs that you write., (*3)

Packagist Build Status Scrutinizer Code Quality Code Coverage Documentation Status, (*4)

Installation

You can install this library using Composer:, (*5)

$ composer require caridea/dao
  • The master branch (version 3.x) of this project requires PHP 7.1 and depends on caridea/event.
  • Version 2.x of this project requires PHP 7.0 and depends on caridea/event.

Compliance

Releases of this library will conform to Semantic Versioning., (*6)

Our code is intended to comply with PSR-1, PSR-2, and PSR-4. If you find any issues related to standards compliance, please send a pull request!, (*7)

Documentation

Features

We provide a mechanism to translate vendor-specific exceptions (right now, MongoDB and Doctrine exceptions) into a standard exception hierarchy., (*8)

  • Conflicting – An exception for concurrency failures.
  • Inoperable – An exception for invalid API usage and configuration problems.
  • Locked – An exception for unwritable records.
  • Unreachable – An exception for connection problems.
  • Unretrievable – An exception for unexpected results, for instance no results or too many results.
  • Violating – An exception for constraint violations.
    • Duplicative – An exception for unique constraint violations.
  • When all else fails, there's Generic.

We also provide abstract DAOs that allow you to make calls against your persistence API and have exceptions translated automatically., (*9)

class MyDao extends \Caridea\Dao\MongoDb
{
    public function create($record)
    {
        $this->logger->info("Creating the record");
        $this->doExecute(function ($manager, $collection) use ($record) {
            $bulk = new \MongoDB\Driver\BulkWrite();
            $bulk->insert($record);
            return $manager->executeBulkWrite($collection, $bulk);
        });
    }
}

The Versions

29/01 2018

dev-master

9999999-dev http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access

29/01 2018

3.0.0

3.0.0.0 http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access

19/09 2016

2.0.3

2.0.3.0 http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access

19/09 2016

2.0.x-dev

2.0.9999999.9999999-dev http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access

19/09 2016

2.0.4

2.0.4.0 http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access

13/09 2016

2.0.2

2.0.2.0 http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access

26/08 2016

2.0.1

2.0.1.0 http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access

20/08 2016

2.0.0

2.0.0.0 http://github.com/libreworks/caridea-dao

A shrimp of a DAO support library

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

mongodb doctrine db exceptions dao data access