weew/app 问题修复 & 功能扩展

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

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

weew/app

Composer 安装命令:

composer require weew/app

包简介

Very minimalistic wrapper for a php application.

README 文档

README

Build Status Code Quality Test Coverage Version Licence

Table of contents

Installation

composer require weew/app

Introduction

This package is meant to be used as a barebone for any php applications. It uses the weew/container package for dependency injection, weew/kernel as a kernel where you can register your providers, the weew/eventer package for event handing and the weew/commander package as the command bus. Configuration is handled by the weew/config package.

Please read documentation of different components to see how they work.

Usage

Creating a new app is very simple:

$app = new App('environment');

// or

$app = new App();
$app->setEnvironment('environment');

// get depdency injection container
$app->getContainer();

// get kernel
$app->getKernel();

// get event bus
$app->getEventer();

// get command bus
$app->getCommander();

You can provide config sources using the config loader.

// get config
$app->getConfigLoader()
    ->addPath('/path/to/config')
    ->addRuntimeConfig(['some' => 'value']);

Be aware that applications current environment and debug mode will always be available inside the config object.

// "dev" by default
$app->getEnvironment();
$app->setEnvironment('test');
// will be set to test
$app->getConfig()->get('env');

// false by default
$app->getDebug();
$app->setDebug(true);
// will be set to true
$app->getConfig()->get('debug');

Be aware that config is only available after the application start.

Extensions

There are several extensions available:

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固