melisplatform / melis-platform-framework-lumen
Melis Platform Framework Lumen module
Installs: 183
Dependents: 3
Suggesters: 0
Security: 0
Stars: 1
Watchers: 7
Forks: 0
Open Issues: 0
Type:melisplatform-module
Requires
- doctrine/dbal: 3.3.8
- laravel/lumen-framework: ^8.3
- melisplatform/melis-platform-frameworks: ^5.0
Requires (Dev)
- fzaninotto/faker: ^1.4
- mockery/mockery: ^1.4.4
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-24 12:09:19 UTC
README
This module brings the Lumen microframework inside melis platform and has a ServiceProvider to access all Melis services.
Getting Started
These instructions will guide you to run the lumen microframework inside melis platform.
Prerequisites
This module requires melisplatform/melis-core and laravel/lumen-framework in order to have this module running. It will automatically be done when using composer.
Installing
composer require melisplatform/melis-platform-framework-lumen
Service Providers
To use the service provider just add the line below in the \bootstrap\app.php file in the "Register Service Providers" area.
$app->register(\MelisPlatformFrameworkLumen\Providers\ZendServiceProvider::class)
You can also use the class MelisServiceProvder anywhere in the app in getting melis services.
Usage
Here's an example of direct calling of a Model from melis-core inside a lumen controller.
$melisCoreLangTable = app('ZendServiceManager)->get('MelisCoreTableLang');
$resultArray = $mesliCoreLangTable->fetchAll()->toArray();
Example of using the class MelisServiceProvider
use MelisPlatformFrameworkLumen\MelisServiceProvider;
$melisServiceProvider = new MelisServiceProvider();
$melisCoreLangTable = $melisServiceProvider->getService('MelisCoreTableLang');
$resultArray = $melisCoreLangTable->fetchAll()->toArray();
Addtional info :
-
In getting a melis service/table, just look for module.config.php in every melisplatform module. Look for the service_manager key, you can use array keys under aliases or under factories.
Example : MelisCoreTableLang
-
You can find the file location according to its current value.
Example : MelisCoreTableLang => 'MelisCore\Model\Tables\MelisLangTable'
File location : melis-core/src/Model/Tables/MelisLangTable.php , in here you can see all the available functions.
Authors
- Melis Technology - www.melistechnology.com
See also the list of contributors who participated in this project.
License
This project is licensed under the OSL-3.0 License - see the LICENSE.md file for details