melisplatform/melis-platform-framework-silex 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

melisplatform/melis-platform-framework-silex

Composer 安装命令:

composer require melisplatform/melis-platform-framework-silex

包简介

A Silex framework dependecy to for running silex inside Melis Platform

README 文档

README

This module runs the Silex micro-framework inside Melis Platform.
The melis-platform-framework silex contains a Silex Service Provider to let Silex use Melis services available.

Getting Started

These instructions will guide you to run the Silex micro-framework inside Melis Platform.

Prerequisites

This module requires melisplatform/melis-core and silex/silex in order to have this module running. This will automatically be done when using composer.

Installing

composer require melisplatform/melis-platform-framework-silex

Service Providers

In order to load and use a service provider, you must register the service provider in the Silex application which is commonly located in /Silex/src/app.php

use MelisPlatformFrameworkSilex\Provider\MelisServiceProvider;

$app = new Silex\Application();

$app->register(new MelisServiceProvider());

Usage

Example of using the MelisServiceProvider in Silex framework.

$melisNewsService = $app['melis.services']->getService("MelisCmsNewsService");
$news = $melisNewsService->getNewsList();

Where to find Melis Services

  • Melis Services are found inside each Melis Modules and these melis modules can be found by following the path below.
/_docroot_/vendor/melisplatform/
  • Inside each Melis Module you can find module.config.php in the config folder.
    The module.config.php contains an array keys called aliases and factories under service_manager.
'service_manager' => array(
    'invokables' => array(
        
    ),
    'aliases' => array(
        'translator' => 'MvcTranslator',
        'MelisCmsNewsTable' => 'MelisCmsNews\Model\Tables\MelisCmsNewsTable',
        'MelisCmsNewsTextsTable' => 'MelisCmsNews\Model\Tables\MelisCmsNewsTextsTable',
    ),
    'factories' => array(
        //services
        'MelisCmsNewsService' => 'MelisCmsNews\Service\Factory\MelisCmsNewsServiceFactory',
        
        //tables
        'MelisCmsNews\Model\Tables\MelisCmsNewsTable' => 'MelisCmsNews\Model\Tables\Factory\MelisCmsNewsTableFactory',
        'MelisCmsNews\Model\Tables\MelisCmsNewsTextsTable' => 'MelisCmsNews\Model\Tables\Factory\MelisCmsNewsTextsTableFactory',
    ),
),
  • The array keys inside aliases or factories can be called in Selix using the MelisServiceProvider.
$melisNewsSvc = $app['melis.services']->getService("MelisCmsNewsService");

统计信息

  • 总下载量: 115
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2019-08-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固