php-activerecord

码农软件 · 软件分类 · ORM/持久层框架 · 2019-09-25 08:42:19

软件介绍

php-activerecord 是一个基于 ActiveRecord 设计模式 开发的开源PHP ORM库。它旨在大大简化与数据库的交互和减少手写 SQL 语句。它不同于其他的ORM,你不需要使用任何的代码生成器,也不费劲去手写、维护模型层的表映射文件。这个库的灵感来自Ruby on Rails ,因此它也借鉴Ruby on Rails 的想法和实现。另外,它也很容易地整合到ZF、CodeIgniter、Lithium、Kohana框架中。php-activerecord 是使用的是 MIT 开源协议许可,所以你可以用它做任何你想做的事情。

示范代码:

建立模型层:

class User extends ActiveRecord\Model
{
}

数据库操作:

# create Tito
$user = User::create(array('name' => 'Tito', 'state' => 'VA'));

# read Tito
$user = User::find_by_name('Tito');

# update Tito
$user->name = 'Tito Jr';
$user->save();

# delete Tito
$user->delete();

本文地址:https://codercto.com/soft/d/15351.html

The Starfish and the Spider

The Starfish and the Spider

Ori Brafman、Rod A. Beckstrom / Portfolio Hardcover / 2006-10-05 / USD 24.95

Understanding the amazing force that links some of today's most successful companies If you cut off a spider's leg, it's crippled; if you cut off its head, it dies. But if you cut off a st......一起来看看 《The Starfish and the Spider》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

SHA 加密
SHA 加密

SHA 加密工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具