emeka/fetcher

Fetcher is a super light weight PHP database driver, that helps you sync and fetch data from any PDO database in your application.

1.0.0 2015-10-09 22:24 UTC

This package is not auto-updated.

Last update: 2025-04-26 20:05:49 UTC


README

<<<<<<< HEAD

Candy

Build Status Scrutinizer Code Quality

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

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 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();
  • Find a model
$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):

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

Candy is maintained by Emeka Osuagwu.

License

Urban dictionary is released under the MIT Licence. See the bundled LICENSE file for more details.

======= Build Status Scrutinizer Code Quality Build Status

Fetcher

Fetcher is a super light weight PHP database driver, that helps you sync and fetch data from any PDO database in your application.

Install

Via Composer

To add open-source-fetcher as a dependency, run the following in your project directory.

$ composer install emeka/fetcher

Then to install, run

$ composer install

Usage

###First

Create .env file in your root Directory

Then add the following

  • 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

$ phpunit

or

$ composer test

Security

f you discover any security related issues, please email emekaosuagwuandela@gmail.com or @dev_emeka instead of using the issue tracker.

Credit

###Emeka Osuagwu

License

The MIT License (MIT). Please see License File for more information.

a5823c5d97cfe4787d130a303bd4f19457aa2579