onericcomputing/mmanager-module-builder

v1.1 2020-06-06 17:57 UTC

This package is auto-updated.

Last update: 2024-04-07 17:16:56 UTC


README

Scrutinizer Code Quality Build Status Latest Stable Version Total Downloads Latest Unstable Version License Code Intelligence Status

Official API to create modules for m'Manager | Invoices Management System

If you're using m'Manager | Invoices Management System for your buisiness and as a Web Developer, you want to extend it with your own free or Premium Modules, this package is designed to help you achieve the task with less effort.

Requirements

Installation

In the composer.json file of your m'Manager installation, add this line:

"require-dev": {
	"onericcomputing/mmanager-module-builder": "dev-master"
}

Then run a composer update .

Usage

In a CodeIgniter controller file, add these lines

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once('vendor/autoload.php');
use Mmanager\Domain\Repository\Customer\CustomerRepository;
use Mmanager\Persistence\Adapter\CodeIgniter\QueryBuilder;

In your class, define a test function

public function test()
{
	// Create a new instance of CI Query Builder
	$driver = new QueryBuilder();

	// Pass CI Query Builder to Customer Repository
	$customerRepo = new CustomerRepository($driver);

	$results = $customerRepo->findAll(1);
	echo var_dump($results->result_array());
}

License

MIT License