PHPackages                             michaldudek/knit - 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. michaldudek/knit

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

michaldudek/knit
================

Knit ties your PHP objects with your database of choice in a simple way.

0.2.7(10y ago)315.0k12MITPHPPHP &gt;=5.5

Since Oct 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/michaldudek/Knit)[ Packagist](https://packagist.org/packages/michaldudek/knit)[ RSS](/packages/michaldudek-knit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (12)Used By (2)

Knit
====

[](#knit)

Knit ties your PHP objects with your database of choice in a simple way.

[![Build Status](https://camo.githubusercontent.com/e96833e41f49f81ed08c3b379f1d6f3ebd1794f4575cd9cbd63462e251d23492/68747470733a2f2f7472617669732d63692e6f72672f6d696368616c647564656b2f4b6e69742e737667)](https://travis-ci.org/michaldudek/Knit)[![SensioLabsInsight](https://camo.githubusercontent.com/3ffdbd6933b2fb5a5db1751fbcff0014891ec1f77f437e36785ec98970790f78/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37613339396666392d613162392d346236372d393961642d6333383635656165383035302f6d696e692e706e67)](https://insight.sensiolabs.com/projects/7a399ff9-a1b9-4b67-99ad-c3865eae8050)

Knit is not a full-blown ORM/ODM, but rather an extended "data mapper" that abstracts away a persistent store behind a "repository" pattern.

Features overview:

- Repository pattern (with methods: `find`, `findOne`, `add`, `update`, `remove`, `save`as well as magic `findByPropertyName` and `findOneByPropertyName`).
- Building queries in form of "criteria" arrays.
- Swappable data stores.
- Various events dispatched (will read, will write, will update, will remove, did read, did update, did remove).
- Easy programmatic joins (which means joins between stores).
- Swappable data mappers.

Check [KnitBundle](https://github.com/michaldudek/KnitBundle) for Symfony2 integration.

Quick Demo:
===========

[](#quick-demo)

```
