定制 baddum/model418 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

baddum/model418

最新稳定版本:v1.2.0

Composer 安装命令:

composer require baddum/model418

包简介

A library for a simple & explicit model couch

关键字:

README 文档

README

Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage Total Downloads License

Model418 is a nice-to-use & highly flexible ORM.
It maps your data, from a database or another source, and its relationships into accessible objects.
It could be used with or without a framework.

  1. Features
  2. Let's code
  3. How to Install
  4. How to Contribute
  5. Author & Community

Features

For now, Model418 supports only the following storage:

  • File System:
    • Encoding: in Yaml (default), JSON, Text or Markdown
    • Subfile: Write the data of an attribute in another file
    • Multi folders: Use multiple folders, like plugins folder
  • Session System

↑ top

Let's code

// Save a new Model
$user = (new UserModel)
    ->set('firstName', 'John')
    ->save();

// Retrieve all models
$userList = (new UserModel)->query()->fetchAll();
count($userList) // 1 
    
// Retrieve by primary key
$john = (new UserModel)->query()->fetchById(1);
    
// Update an existing Model
$john->set('lastName', 'Doe')
    ->save();
    
// Delete an existing Model
$john->delete();

To go further, you should read the complete documentation.

↑ top

How to Install

This library package requires PHP 5.4 or later.
Install Composer and run the following command to get the latest version:

composer require baddum/model418:1.2.*

↑ top

How to Contribute

Get involved

  1. Star the project!
  2. Report a bug that you find
  3. Tweet and blog about Model418 and Let me know about it.

Pull Requests

Pull requests are highly appreciated.
Please review the guidelines for contributing to go further.

↑ top

Author & Community

Model418 is under MIT License.
It was created & is maintained by Thomas ZILLIOX.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-12