dev-master
9999999-devA simple orm for lightweight applications
MIT
The Requires
- php >=5.5.1
- vlucas/phpdotenv ^2.0
The Development Requires
by Verem Dugeri
orm database sql php persistence
A simple orm for lightweight applications
Persistence Manager is a lightweight ORM based on concepts borrowed from the laravel framework, (*2)
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();
$user = User::find($id);
$user = User::find($id); $user->password = "sâ rĂžngerPaSswoRd"; $user->save();
$result = User::destroy($id):
``````` $user = User::where('username', 'john'); ``````, (*5)
$users = User::all();
Please check out CHANGELOG file for information on what has changed recently., (*6)
Please check out CONTRIBUTING file for detailed contribution guidelines., (*7)
PersistenceManager is maintained by Verem Dugeri
., (*8)
Persistence Manager is released under the MIT Licence. See the bundled LICENSE file for more details., (*9)
A simple orm for lightweight applications
MIT
orm database sql php persistence