承接 verem/persitencemanager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

verem/persitencemanager

Composer 安装命令:

composer require verem/persitencemanager

包简介

A simple orm for lightweight applications

README 文档

README

Build Status

#Persistence Manager Persistence Manager is a lightweight ORM based on concepts borrowed from the laravel framework

#Testing The phpunit framework for testing is used to perform unit test on the classes. The TDD principle has been employed to make the application robust

Run this on bash to execute the tests

/vendor/bin/phpunit

#Install

  • To install this package, PHP 5.5+ and Composer are required
composer require verem/persitencemanager

#usage

  • When creating a model, PersistenceManager maps the name of the table to the Model name, replacing any camel cases with underscores and replaces it with the plural form of the word.

      UserRole maps to table user_roles
  • Save a record to database

$user = new User();
$user->username = "john";
$user->password = "password";
$user->email = "john@doe.co";
$user->save();
  • Find a record from the database
$user = User::find($id);
  • Update a record
$user = User::find($id);
$user->password = "s†røngerPaSswoRd";
$user->save();
  • Delete a record -- returns a boolean
$result = User::destroy($id):
  • Find a record based on column value - Returns an object
$user = User::where('username', 'john');
``````

- Find all users in the database - Returns object array
````````php
$users = User::all();

Change log

Please check out CHANGELOG file for information on what has changed recently.

Contributing

Please check out CONTRIBUTING file for detailed contribution guidelines.

Credits

PersistenceManager is maintained by Verem Dugeri.

License

Persistence Manager is released under the MIT Licence. See the bundled LICENSE file for more details.

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-07