seyfer/kohana-doctrine 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

seyfer/kohana-doctrine

Composer 安装命令:

composer require seyfer/kohana-doctrine

包简介

Kohana module to integrate with Doctrine ORM

README 文档

README

Kohana 3.3 and 3.2 module to integrate Doctrine ORM 2.4.

Download Doctrine 2 and put it in /vendor: composer update

License:

Attribution 3.0 Unported (CC BY 3.0)

Usage:

in config/doctrine.php

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

Entity in doctrine/entity/ folder

<?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

$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

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).

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-01-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固