2017 © Pedro Peláez
 

library basicinvoices-modulemanager

image

basicinvoices/basicinvoices-modulemanager

  • Saturday, November 5, 2016
  • by JPG-Consulting
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

basicinvoices-modulemanager

This module basically allows you to load modules from a database table., (*1)

Installation

Add this project in your composer.json:, (*2)

"require": {
    "basicinvoices/basicinvoices-modulemanager": "dev-master"
}

Tell composer to download the module by running:, (*3)

composer update

Post installation

Enable the module in your application by editting module.config.php. As an example:, (*4)

return [
    'Zend\Db',
    'BasicInvoices\ModuleManager',
    'Zend\Validator',
    'Application',
];

Create the database table., (*5)

CREATE TABLE IF NOT EXISTS `modules` (
 `name` varchar(100) NOT NULL,
 `description` varchar(255) DEFAULT NULL,
 `active` tinyint(1) NOT NULL DEFAULT '0',
 UNIQUE KEY `UX_MODULE_NAME` (`name`),
 KEY `IX_ACTIVE_MODULE` (`active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

The description column is not really needed but comes in handy if building a controller to load or unload the modules., (*6)

The module will only load the active modules., (*7)

Enable the database configuration by editting global.php, (*8)

 return [
     'db' => [
         'driver'         => 'Pdo',
         'dsn'            => 'mysql:dbname=basic_invoices;host=localhost',
         'driver_options' => [
             PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
         ],
     ],
 ];

...and the database credentials in your local.php, (*9)

return [
     'db' => [
         'username' => 'YOURUSERNAME',
         'password' => 'YOURPASSWORD',
     ],
 ];

...and you are ready to go!, (*10)

The Versions

05/11 2016

dev-master

9999999-dev https://github.com/basicinvoices/basicinvoices-modulemanager

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 db modulemanager