maltyxx/origami
最新稳定版本:v1.0.3
Composer 安装命令:
composer require maltyxx/origami
包简介
Origami ORM for CodeIgniter 3
关键字:
README 文档
README
Object Relational Mapping for Codeigniter 3
Requirements
- PHP 5.3.x (Composer requirement)
- CodeIgniter 3.0.x
Installation
Step 1 Installation by Composer
Run composer
composer require maltyxx/origami
Step 2 Create files
Create controller file in /application/controllers/Origami_generator.php.
<?php defined('BASEPATH') OR exit('No direct script access allowed'); require(APPPATH.'/third_party/origami/controllers/Origami_generator.php');
Step 3 Configuration
Duplicate configuration file ./application/third_party/origami/config/origami.php in ./application/config/origami.php.
Step 4 Examples
Model file is located in /application/models/User_model.php.
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class User_model extends CI_Model { function __construct() { parent::__construct(); $this->load->add_package_path(APPPATH.'third_party/origami'); $this->load->library('origami'); $this->load->remove_package_path(APPPATH.'third_party/origami'); } public function create() { $user = new \Entity\test\user(); $user->firstname = 'John'; $user->lastname = 'Do'; $user->dateinsert = new DateTime(); $user->dateupdate = new DateTime(); $user->save(); } }
统计信息
- 总下载量: 6.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2015-07-02