PHPackages                             spadefoot/kohana-orm-leap - 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. spadefoot/kohana-orm-leap

ActiveKohana-module[Database &amp; ORM](/categories/database)

spadefoot/kohana-orm-leap
=========================

An ORM module for the Kohana PHP framework that is designed to work with all major databases.

981325[20 issues](https://github.com/spadefoot/kohana-orm-leap/issues)PHP

Since Aug 23Pushed 10y ago20 watchersCompare

[ Source](https://github.com/spadefoot/kohana-orm-leap)[ Packagist](https://packagist.org/packages/spadefoot/kohana-orm-leap)[ RSS](/packages/spadefoot-kohana-orm-leap/feed)WikiDiscussions 3.3/master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

LEAP for Kohana PHP Framework
=============================

[](#leap-for-kohana-php-framework)

LEAP is an database management library for the [Kohana PHP Framework](http://kohanaframework.org) and is designed to work with DB2, Drizzle, Firebird, MariaDB, MS SQL, MySQL, Oracle, PostgreSQL, and SQLite. LEAP acts as a common interface between the different database dialects and connections. It provides a powerful query builder and ORM. LEAP's ORM is based on the active record design pattern, which utilizes PHP objects to model database tables.

Make sure to "Star" this project if you like it.

Motivation
----------

[](#motivation)

LEAP is meant to be a simple, clean project. The primary goal of LEAP is to create an ORM for the Kohana PHP Framework that works with all major databases and is meant to be a true Kohana module so that it could be just dropped into Kohana's modules folder and work. Even though other ORMs like [Doctrine](http://www.doctrine-project.org/projects/orm) are adaptable to Kohana, doing so requires a lot of work. Another goal for the development of LEAP is to create an ORM for Kohana that can harness the power of composite keys, which many other ORMs (e.g. [Kohana's official ORM](https://github.com/kohana/orm), [Jelly](https://github.com/creatoro/jelly), and [Sprig](https://github.com/sittercity/sprig/)) cannot handle.

Features
--------

[](#features)

LEAP provides a number of features, such as:

- Plugins for DB2, Drizzle, Firebird, MariaDB, MS SQL, MySQL, Oracle, PostgreSQL, and SQLite.
- Designed to work in conjunction with other database tools for Kohana.
- [Config file for designating the database driver (e.g. PDO) and connection strings](http://spadefoot.github.io/kohana-orm-leap/tutorials/setting-up-a-database-connection/).
- Classes are easily extensible.
- A [database connection pool](http://spadefoot.github.io/kohana-orm-leap/tutorials/establishing-a-database-connection/) for managing resources.
- A powerful [query builder for creating SQL statements](http://spadefoot.github.io/kohana-orm-leap/tutorials/building-sql-statements/).
- Sanitizes data to help prevent SQL injection attacks.
- Capable of handling non-integers primary keys.
- Supports composite primary keys and composite foreign keys.
- Enforces strong data types on [database fields](http://spadefoot.github.io/kohana-orm-leap/tutorials/mapping-a-model/#fields).
- Allows [field aliases](http://spadefoot.github.io/kohana-orm-leap/tutorials/mapping-a-model/#aliases) to be declared.
- Makes working with certain database fields easy with [field adaptors](http://spadefoot.github.io/kohana-orm-leap/tutorials/mapping-a-model/#adaptors).
- A set of Auth classes for authenticating user logins.
- A toolkit of useful functions.
- [Leap's API](http://orm.spadefootcode.com/api/annotated.html) that documents each class.
- Lots of [tutorials](http://spadefoot.github.io/kohana-orm-leap/tutorials/).

Getting Started
---------------

[](#getting-started)

To start using LEAP, follow these steps:

1. Just download the module (see below regarding as to which branch) from github.
2. Unzip the download to the modules folder in Kohana.
3. Rename the uncompressed folder to "leap".
4. Modify leap/config/database.php.
5. Add "leap" as a module to application/bootstrap.php.
6. Begin creating your models in the application/classes/model/leap/ folder.

For more information, see the tutorial on [installing LEAP](http://spadefoot.github.io/kohana-orm-leap/install/).

### About Branches

[](#about-branches)

- 3.3/master - PHP 5.3+, Kohana 3.3.X, maintained, stable
- 3.3/develop - PHP 5.3+, Kohana 3.3.X, maintained, unstable
- 3.3/legacy - PHP 5.2+, Kohana 3.3.X, deprecated, stable
- 3.2/master - PHP 5.3+, Kohana 3.2.X, maintained, stable
- 3.2/develop - PHP 5.3+, Kohana 3.2.X, maintained, unstable
- 3.2/legacy - PHP 5.2+, Kohana 3.2.X, deprecated, stable
- 3.1/master - PHP 5.3+, Kohana 3.1.X, maintained, stable
- 3.1/develop - PHP 5.3+, Kohana 3.1.X, maintained, unstable
- 3.1/legacy - PHP 5.2+, Kohana 3.1.X, deprecated, stable

Required Files
--------------

[](#required-files)

The LEAP ORM module is meant to be completely independent of other Kohana modules. However, it is recommended that Kohana's database module be installed as well so that you can utilize the Database\_Expression class. As for the files within LEAP, you can remove any database plugins that you are not using. This is possible because each database plugin in LEAP is considered independent of the others.

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

[](#documentation)

This project is accompanied by [old site](http://orm.spadefootcode.com) [a companion Web site](http://spadefoot.github.io/kohana-orm-leap/), which documents the [API for the LEAP ORM](http://orm.spadefootcode.com/api/annotated.html)and has a number of [examples and tutorials](http://spadefoot.github.io/kohana-orm-leap/tutorials/). You can also find other tutorials and examples online (please let us know if you find one that we should highlight here).

Further Assistance
------------------

[](#further-assistance)

Although LEAP is simple to use with the Kohana PHP Framework, you can get further assistance by asking questions on either [Kohana's Forum](http://forum.kohanaframework.org/)or [Stack Overflow](http://stackoverlow.com). You can also send an email to .

Reporting Bugs &amp; Making Recommendations
-------------------------------------------

[](#reporting-bugs--making-recommendations)

If you find a bug in the code or if you would like to make a recommendation, we would be happy to hear from you. Here are three methods you can use to notify us:

- Log an issue in this project's [issue tracker](https://github.com/spadefoot/kohana-orm-leap/issues?sort=comments&direction=desc&state=open).
- Create a fork of this project and submit a [pull request](http://help.github.com/send-pull-requests/).
- Send an email to .

Known Issues
------------

[](#known-issues)

Please see this project's [issue tracker](https://github.com/spadefoot/kohana-orm-leap/issues?sort=comments&direction=desc&state=open) on github for any known issues.

Updates
-------

[](#updates)

Make sure that you add yourself as a watcher of this project so that you can watch for updates. If you would like to be notified directly via email please send an email to .

Future Development
------------------

[](#future-development)

This project is constantly being improved and extended. If you would like to contribute to LEAP, please fork this project and then send us your additions/modifications using a [pull request](http://help.github.com/send-pull-requests/).

License
-------

[](#license)

### Apache v2.0

[](#apache-v20)

Copyright © 2011–2013 Spadefoot Team.

Unless otherwise noted, LEAP is licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/381024?v=4)[Chad Saunders](/maintainers/chadsaun)[@chadsaun](https://github.com/chadsaun)

---

Top Contributors

[![ziminji](https://avatars.githubusercontent.com/u/667908?v=4)](https://github.com/ziminji "ziminji (11 commits)")[![bluesnowman](https://avatars.githubusercontent.com/u/1520731?v=4)](https://github.com/bluesnowman "bluesnowman (7 commits)")[![chadsaun](https://avatars.githubusercontent.com/u/381024?v=4)](https://github.com/chadsaun "chadsaun (6 commits)")[![saruman](https://avatars.githubusercontent.com/u/813190?v=4)](https://github.com/saruman "saruman (5 commits)")[![khairilanuar](https://avatars.githubusercontent.com/u/227631?v=4)](https://github.com/khairilanuar "khairilanuar (2 commits)")[![kohenkatz](https://avatars.githubusercontent.com/u/88755?v=4)](https://github.com/kohenkatz "kohenkatz (1 commits)")

### Embed Badge

![Health badge](/badges/spadefoot-kohana-orm-leap/health.svg)

```
[![Health](https://phpackages.com/badges/spadefoot-kohana-orm-leap/health.svg)](https://phpackages.com/packages/spadefoot-kohana-orm-leap)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M117](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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