<<<<<<< HEAD, (*1)
Candy
, (*2)
Candy is lightweight ORM based in php
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 emeka/candy
``````
#Usage
- Save a model in the database
````````
$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();
- Delete a record -- returns a boolean
$result = User::destroy($id):
Change log
Please check out CHANGELOG file for information on what has changed recently., (*5)
Contributing
Please check out CONTRIBUTING file for detailed contribution guidelines., (*6)
Credits
Candy is maintained by Emeka Osuagwu
., (*7)
License
Urban dictionary is released under the MIT Licence. See the bundled LICENSE file for more details., (*8)
=======
, (*9)
Fetcher
Fetcher is a super light weight PHP database driver, that helps you sync and fetch data from any PDO database in your application., (*10)
Install
Via Composer, (*11)
To add open-source-fetcher as a dependency, run the following in your project directory., (*12)
$ composer install emeka/fetcher
Then to install, run, (*13)
$ composer install
Usage
First
Create .env file in your root Directory
, (*14)
Then add the following, (*15)
- db_user = "database_user"
- db_host = "database_host"
- db_name = "database_name"
- database = "database_type"
- db_password = "database_password"
Then
use Emeka\Fetcher\Fetcher\Fetch;
$fetcher = new Fetch();
$fetch->query('Select * from posts');
echo $fetcher->fetchObj();
echo $fetcher->fetchLazy();
echo $fetcher->fetchBoth();
echo $fetcher->fetchAssoc();
Testing
To test, type the following into the terminal from the project directory, (*16)
$ phpunit
or, (*17)
$ composer test
Security
f you discover any security related issues, please email emekaosuagwuandela@gmail.com or @dev_emeka instead of using the issue tracker., (*18)
Credit
Emeka Osuagwu
License
The MIT License (MIT). Please see License File for more information., (*19)
a5823c5d97cfe4787d130a303bd4f19457aa2579, (*20)