Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

jaceju-tutorial-examples/my-orm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyORM

外部操作

$user = User::find(1); $articles = $user->findArticles();

內部實作分類

Table Gateway

把邏輯操作與 Table 物件分離

Active Record

直接在 Row (Record) 上面加入邏輯操作

需要的類別

  • Db :包裝 PDO
  • Db\Table :包裝 Table
  • Db\Row : Active Record

實作目標

Db

  • 包裝把 PDO 相關方法
  • 提供 factory 方法
  • 延遲連接

Releases

No releases published

Packages

No packages published

Languages