Outlet - ORM框架


未知
跨平台
PHP

软件简介

Outlet是一个PHP对象/关系映射框架ORM。该框架不需要实体对象实现指定的接口或继承某些基类。它是一个非常轻量级的框架,拥有一大把的工具和类可以用。

示例代码:

<?php  
$outlet = Outlet::getInstance();  
   
$client = new Client;  
$client->Name = 'Test Client';  
   
$project = new Project;  
$project->Name = 'Cool Project';  
$project->setClient( $client );  
   
$bug = new Bug;  
$bug->Title = "Button doesn't work";  
   
$project->addBug( $bug );  
   
// inserts the project   
// and all of the related entities  
// in one transaction  
$outlet->save( $project );