kohana / doctrine
Kohana module for integrating doctrine into kohana
Requires
- php: >=5.4
- doctrine/orm: ~2.5
- kohana/core: ~3.3
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.6
- squizlabs/php_codesniffer: ~2.3
This package is auto-updated.
Last update: 2024-12-11 14:17:15 UTC
README
The doctrine library for Kohana 3 provides a simple integration with doctrine 2.*. You can configure your doctrine
integration by placing the config/doctrine.php
file into your app/config
folder and editing it.
Supported mapping solutions
Currently this module supports the following mapping methods.
- Annotation
- Xml
- Yaml
Supported caching solutions
Currently this module supports the following caching methods.
- Apc
- Array
- Memcache
- Redis
- Xcache
Using Doctrine
To use Kohana Doctrine, install it by composer require. You can do this by running composer require kohana/doctrine
in your CLI.
Then add Kohana Doctrine to your modules in bootstrap.php
by adding the following line 'doctrine' => VENDORPATH.'kohana/doctrine'
.
To configure doctrine copy the vendor/kohana/doctrine/config/doctrine.php
or your app/config
folder and editing it.
Quick example
The following is a quick example of how to use Kohana Doctrine by getting the entity manager and getting a repository from the entity manager.
$entityManager = \Kohana\Doctrine\EntityManager::instance();
$entityManager->getRepository('Full\Namespace\To\Entity')