{"id":22656863,"url":"https://github.com/libreworks/caridea-dao","last_synced_at":"2025-08-03T11:07:43.187Z","repository":{"id":62499613,"uuid":"66088382","full_name":"libreworks/caridea-dao","owner":"libreworks","description":":fried_shrimp: Caridea is a miniscule PHP application library. This is a shrimpy DAO support library.","archived":false,"fork":false,"pushed_at":"2018-01-29T00:11:48.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T21:05:49.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libreworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-19T14:30:05.000Z","updated_at":"2016-11-17T19:51:22.000Z","dependencies_parsed_at":"2022-11-02T09:45:57.376Z","dependency_job_id":null,"html_url":"https://github.com/libreworks/caridea-dao","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/libreworks/caridea-dao","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-dao","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-dao/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-dao/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-dao/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libreworks","download_url":"https://codeload.github.com/libreworks/caridea-dao/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libreworks%2Fcaridea-dao/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268531912,"owners_count":24265250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T10:16:43.405Z","updated_at":"2025-08-03T11:07:43.139Z","avatar_url":"https://github.com/libreworks.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# caridea-dao\nCaridea 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.\n\n![](http://libreworks.com/caridea-100.png)\n\nThis is its Data Access Object support component. You can use these classes to support DAOs that you write.\n\n[![Packagist](https://img.shields.io/packagist/v/caridea/dao.svg)](https://packagist.org/packages/caridea/dao)\n[![Build Status](https://travis-ci.org/libreworks/caridea-dao.svg)](https://travis-ci.org/libreworks/caridea-dao)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/libreworks/caridea-dao/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/libreworks/caridea-dao/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/libreworks/caridea-dao/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/libreworks/caridea-dao/?branch=master)\n[![Documentation Status](http://readthedocs.org/projects/caridea-dao/badge/?version=latest)](http://caridea-dao.readthedocs.io/en/latest/?badge=latest)\n\n## Installation\n\nYou can install this library using Composer:\n\n```console\n$ composer require caridea/dao\n```\n\n* The master branch (version 3.x) of this project requires PHP 7.1 and depends on `caridea/event`.\n* Version 2.x of this project requires PHP 7.0 and depends on `caridea/event`.\n\n## Compliance\n\nReleases of this library will conform to [Semantic Versioning](http://semver.org).\n\nOur code is intended to comply with [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/), and [PSR-4](http://www.php-fig.org/psr/psr-4/). If you find any issues related to standards compliance, please send a pull request!\n\n## Documentation\n\n* Head over to [Read the Docs](http://caridea-dao.readthedocs.io/en/latest/)\n\n## Features\n\nWe provide a mechanism to translate vendor-specific exceptions (right now, MongoDB and Doctrine exceptions) into a standard exception hierarchy.\n\n* `Conflicting` – An exception for concurrency failures.\n* `Inoperable` – An exception for invalid API usage and configuration problems.\n* `Locked` – An exception for unwritable records.\n* `Unreachable` – An exception for connection problems.\n* `Unretrievable` – An exception for unexpected results, for instance no results or too many results.\n* `Violating` – An exception for constraint violations.\n   * `Duplicative` – An exception for unique constraint violations.\n* When all else fails, there's `Generic`.\n\nWe also provide abstract DAOs that allow you to make calls against your persistence API and have exceptions translated automatically.\n\n```php\nclass MyDao extends \\Caridea\\Dao\\MongoDb\n{\n    public function create($record)\n    {\n        $this-\u003elogger-\u003einfo(\"Creating the record\");\n        $this-\u003edoExecute(function ($manager, $collection) use ($record) {\n            $bulk = new \\MongoDB\\Driver\\BulkWrite();\n            $bulk-\u003einsert($record);\n            return $manager-\u003eexecuteBulkWrite($collection, $bulk);\n        });\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibreworks%2Fcaridea-dao","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibreworks%2Fcaridea-dao","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibreworks%2Fcaridea-dao/lists"}