2017 © Pedro PelĂĄez
 

library persitencemanager

A simple orm for lightweight applications

image

verem/persitencemanager

A simple orm for lightweight applications

  • Friday, August 19, 2016
  • by danverem
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Persistence Manager

Persistence Manager is a lightweight ORM based on concepts borrowed from the laravel framework, (*2)

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, (*3)

Run this on bash to execute the tests ```````bash /vendor/bin/phpunit, (*4)


#Install - To install this package, PHP 5.5+ and Composer are required ````bash 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. ``````php UserRole maps to table user_roles `````` - Save a record to database ````````php $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'); ``````, (*5)

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

Change log

Please check out CHANGELOG file for information on what has changed recently., (*6)

Contributing

Please check out CONTRIBUTING file for detailed contribution guidelines., (*7)

Credits

PersistenceManager is maintained by Verem Dugeri., (*8)

License

Persistence Manager is released under the MIT Licence. See the bundled LICENSE file for more details., (*9)

The Versions

19/08 2016

dev-master

9999999-dev

A simple orm for lightweight applications

  Sources   Download

MIT

The Requires

 

The Development Requires

orm database sql php persistence