承接 caridea/dao 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

caridea/dao

Composer 安装命令:

composer require caridea/dao

包简介

A shrimp of a DAO support library

README 文档

README

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.

This is its Data Access Object support component. You can use these classes to support DAOs that you write.

Packagist Build Status Scrutinizer Code Quality Code Coverage Documentation Status

Installation

You can install this library using Composer:

$ 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.

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!

Documentation

Features

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

  • 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.

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);
        });
    }
}

统计信息

  • 总下载量: 510
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-08-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固