2017 © Pedro Peláez
 

kohana-module kohana-doctrine

Kohana module to integrate with Doctrine ORM

image

seyfer/kohana-doctrine

Kohana module to integrate with Doctrine ORM

  • Monday, February 9, 2015
  • by seyfer
  • Repository
  • 2 Watchers
  • 5 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

kohana-doctrine

Kohana 3.3 and 3.2 module to integrate Doctrine ORM 2.4., (*1)

Download Doctrine 2 and put it in /vendor: composer update, (*2)

License:

Attribution 3.0 Unported (CC BY 3.0), (*3)

Usage:

in config/doctrine.php, (*4)

'mappings_path'       => APPPATH . 'classes/doctrine/entity',
'mappings_driver'     => 'annotation',

Entity in doctrine/entity/ folder, (*5)

<?php

use Doctrine\ORM\Mapping as ORM;

/**
 * Description of Doctrine_Entity_Site
 *
 * @author seyfer
 * @ORM\Entity
 * @ORM\Table(name="sites")
 */
class Doctrine_Entity_Site
{

    /**
     * @ORM\Id
     * @ORM\GeneratedValue (strategy="IDENTITY")
     * @ORM\Column(type="integer", nullable=false)
     * @var int
     */
    protected $id;

    /**
     * @ORM\Column(type="string")
     * @var string
     */
    protected $name;
}

in controller, (*6)

$doctrine_orm  = new Doctrine_ORM;
$entityManager = $doctrine_orm->get_entity_manager();

//EntityManager
Debug::vars(get_class($entityManager));

$site = $entityManager->getRepository("Doctrine_Entity_Site")->find("11");

//Doctrine_Entity_Site
Debug::vars($site);

There is also Migrations module https://github.com/seyfer/kohana-doctrinemigrations, (*7)

You are free:

  • to Share — to copy, distribute and transmit the work
  • to Remix — to adapt the work

Under the following conditions:

  • Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

The Versions

09/02 2015

dev-3.3/master

dev-3.3/master

Kohana module to integrate with Doctrine ORM

  Sources   Download

The Requires

 

09/01 2015

dev-master

9999999-dev

Kohana module to integrate with Doctrine ORM

  Sources   Download

The Requires

 

09/01 2015

dev-3.2/master

dev-3.2/master

Kohana module for 3.2 version to integrate with Doctrine ORM

  Sources   Download

The Requires