PHPackages                             thefinaloutpost/cakedatasource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. thefinaloutpost/cakedatasource

ActiveLibrary[Database &amp; ORM](/categories/database)

thefinaloutpost/cakedatasource
==============================

Personal fork of Cake/datasource to update cache dependency. Provides connection managing and traits for Entities and Queries that can be reused for different datastores

0.0.1(4y ago)0251MITPHPPHP &gt;=7.2.0

Since Dec 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/TheFinalOutpost/cakeDatasource)[ Packagist](https://packagist.org/packages/thefinaloutpost/cakedatasource)[ Docs](https://cakephp.org)[ RSS](/packages/thefinaloutpost-cakedatasource/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (1)

[![Total Downloads](https://camo.githubusercontent.com/dedd2f60d3fd05743332176df3e4ea0951d1add787dbfd806114771bad564c52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63616b657068702f64617461736f757263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cakephp/datasource)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)

CakePHP Datasource Library
==========================

[](#cakephp-datasource-library)

This library contains interfaces for implementing Repositories and Entities using any data source, a class for managing connections to datasources and traits to help you quickly implement the interfaces provided by this package.

Repositories
------------

[](#repositories)

A repository is a class capable of interfacing with a data source using operations such as `find`, `save` and `delete` by using intermediate query objects for expressing commands to the data store and returning Entities as the single result unit of such system.

In the case of a Relational database, a Repository would be a `Table`, which can be return single or multiple `Entity` objects by using a `Query`.

This library exposes the following interfaces for creating a system that implements the repository pattern and is compatible with the CakePHP framework:

- `RepositoryInterface` - Describes the methods for a base repository class.
- `EntityInterface` - Describes the methods for a single result object.
- `ResultSetInterface` - Represents the idea of a collection of Entities as a result of a query.

Additionally, this package provides a few traits and classes you can use in your own implementations:

- `EntityTrait` - Contains the default implementation for the `EntityInterface`.
- `QueryTrait` - Exposes the methods for creating a query object capable of returning decoratable collections.
- `ResultSetDecorator` - Decorates any traversable object, so it complies with `ResultSetInterface`.

Connections
-----------

[](#connections)

This library contains a couple of utility classes meant to create and manage connection objects. Connections are typically used in repositories for interfacing with the actual data source system.

The `ConnectionManager` class acts as a registry to access database connections your application has. It provides a place that other objects can get references to existing connections. Creating connections with the `ConnectionManager` is easy:

```
use Cake\Datasource\ConnectionManager;

ConnectionManager::config('connection-one', [
    'className' => 'MyApp\Connections\CustomConnection',
    'param1' => 'value',
    'param2' => 'another value'
]);

ConnectionManager::config('connection-two', [
    'className' => 'MyApp\Connections\CustomConnection',
    'param1' => 'different value',
    'param2' => 'another value'
]);
```

When requested, the `ConnectionManager` will instantiate `MyApp\Connections\CustomConnection` by passing `param1` and `param2` inside an array as the first argument of the constructor.

Once configured connections can be fetched using `ConnectionManager::get()`. This method will construct and load a connection if it has not been built before, or return the existing known connection:

```
use Cake\Datasource\ConnectionManager;
$conn = ConnectionManager::get('master');
```

It is also possible to store connection objects by passing the instance directly to the manager:

```
use Cake\Datasource\ConnectionManager;
$conn = ConnectionManager::config('other', $connectionInstance);
```

Documentation
-------------

[](#documentation)

Please make sure you check the [official API documentation](https://api.cakephp.org/4.x/namespace-Cake.Datasource.html)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1646d ago

Major Versions

0.0.1 → 1.0.x-dev2021-12-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e7e4dbc420c782f43fdafa17331eab9471f8e9fcd121651e4bd9ba2aa887fe2?d=identicon)[Corteo](/maintainers/Corteo)

---

Top Contributors

[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (187 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (174 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (82 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (73 commits)")[![othercorey](https://avatars.githubusercontent.com/u/24221186?v=4)](https://github.com/othercorey "othercorey (22 commits)")[![antograssiot](https://avatars.githubusercontent.com/u/4977112?v=4)](https://github.com/antograssiot "antograssiot (21 commits)")[![josegonzalez](https://avatars.githubusercontent.com/u/65675?v=4)](https://github.com/josegonzalez "josegonzalez (17 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (14 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (12 commits)")[![JoshuaLuckers](https://avatars.githubusercontent.com/u/1268085?v=4)](https://github.com/JoshuaLuckers "JoshuaLuckers (10 commits)")[![robertpustulka](https://avatars.githubusercontent.com/u/7437773?v=4)](https://github.com/robertpustulka "robertpustulka (10 commits)")[![chinpei215](https://avatars.githubusercontent.com/u/7399393?v=4)](https://github.com/chinpei215 "chinpei215 (6 commits)")[![bar](https://avatars.githubusercontent.com/u/88155?v=4)](https://github.com/bar "bar (6 commits)")[![AD7six](https://avatars.githubusercontent.com/u/33387?v=4)](https://github.com/AD7six "AD7six (5 commits)")[![dakota](https://avatars.githubusercontent.com/u/83255?v=4)](https://github.com/dakota "dakota (5 commits)")[![ndm2](https://avatars.githubusercontent.com/u/5031606?v=4)](https://github.com/ndm2 "ndm2 (5 commits)")[![saeideng](https://avatars.githubusercontent.com/u/8215801?v=4)](https://github.com/saeideng "saeideng (5 commits)")[![ypnos-web](https://avatars.githubusercontent.com/u/15981753?v=4)](https://github.com/ypnos-web "ypnos-web (4 commits)")[![Marlinc](https://avatars.githubusercontent.com/u/1240253?v=4)](https://github.com/Marlinc "Marlinc (4 commits)")[![Theaxiom](https://avatars.githubusercontent.com/u/57013?v=4)](https://github.com/Theaxiom "Theaxiom (4 commits)")

---

Tags

cakephpqueryentitydatasourceconnection management

### Embed Badge

![Health badge](/badges/thefinaloutpost-cakedatasource/health.svg)

```
[![Health](https://phpackages.com/badges/thefinaloutpost-cakedatasource/health.svg)](https://phpackages.com/packages/thefinaloutpost-cakedatasource)
```

###  Alternatives

[cakephp/datasource

Provides connection managing and traits for Entities and Queries that can be reused for different datastores

4725.8M15](/packages/cakephp-datasource)[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69634.4M144](/packages/algolia-algoliasearch-client-php)[cakephp/database

Flexible and powerful Database abstraction library with a familiar PDO-like API

9825.7M45](/packages/cakephp-database)[directorytree/ldaprecord

A fully-featured LDAP ORM.

5793.3M15](/packages/directorytree-ldaprecord)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
