承接 modus/framework 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

modus/framework

最新稳定版本:4.3.3

Composer 安装命令:

composer require modus/framework

包简介

The Modus framework, providing basic support for many components of Aura and other libraries.

README 文档

README

(Note: This README is a work in progress.)

The Modus Framework is a collection of components included through Composer and bound together by "glue code" that makes the components useful as a unit.

Modus makes use of many components of Aura, as well as some Symfony components and others.

Installing Modus

After cloning and checking out the repository, you'll want to install the dependencies with Composer.

Once these components are installed, you can run the Modus command line, which will place the files in the correct directory structure.

$ php vendor/bin/modus

Modus expects to be used as a full framework for your application, operating in the root directory. It uses an htaccess file to route all calls to the index file in the public/ directory. The following vhost configuration is recommended.

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /path/to/modus/public
    
    #Custom log file locations
    LogLevel warn
    ErrorLog   /path/to/modus/logs/error.log
    CustomLog  /path/to/modus/logs/access.log combined

    php_flag log_errors On
    php_value error_log  /path/to/modus/logs/php_errors.log

    <Directory /path/to/modus/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Modus Configuration Files

Modus uses a configuration system that incorporates dependency inversion through Aura's Dependency Injection package.

In addition, there are some files you'll want to modify on your own for your setup:

  • config.php - This contains configuration options for your application.
  • routes.php - This contains route information. There are a few example routes already provided, which you can copy and reuse.

Configuring Routes

Routes are often the most complex part of an application, but the goal is to make them as simple as possible.

At their most basic, a route has a key which names the route, and the value is an array containing two keys: the route itself and the parameters for the route.

<?php

array(
    "dashboard" => [
        "path" => "/dashboard",
        "args" => ["values" => ['controller' => 'dashboard', 'action' => 'index']]
    ],
);

Of course, some routes are more complex than this and require additional options. For example, to specify a ID value on the end of a route, you add a params key to the args array, like so:

<?php

array(
    "dashboard" => [
        "path" => "/dashboard/{:id}",
        "args" => ["values" => ['controller' => 'dashboard', 'action' => 'index'], 'params' => ['id' => '(/d+)']]
    ],
);

Note that all parameter rules of the Aura.Router package are followed. Check the documentation for more.

If you have complex namespace requirements, you can also specify a fully-qualified namespace path to the controller:

<?php

array(
    "dashboard" => [
        "path" => "/dashboard",
        "args" => ["values" => ['controllerns' => 'Full\Namespace\Goes\Here', 'action' => 'index']]
    ],
);

modus/framework 适用场景与选型建议

modus/framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 171 次下载、GitHub Stars 达 5, 最近一次更新时间为 2015 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 modus/framework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 modus/framework 我们能提供哪些服务?
定制开发 / 二次开发

基于 modus/framework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-10