承接 slim/extras 相关项目开发

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

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

slim/extras

Composer 安装命令:

composer require slim/extras

包简介

Extras package for the Slim Framework

README 文档

README

This repository contains extra resources that complement the Slim Framework, a PHP micro framework that helps you quickly write simple yet powerful web applications.

For custom views we are now recommending using the Slim Views repo instead. We are simplifying the amount of views we officially support and will be splitting up the Slim Extras repo into smaller chunks.

For custom loggers we are now recommending using the Slim Logger repo instead.

Custom Views

This repository contains custom views for your Slim Framework applications. Custom views let you easily use popular third-party templating frameworks, like Twig or Smarty, with your Slim Framework application.

  • Smarty
  • Twig
  • Mustache
  • Haml
  • Haanga
  • Blitz
  • Dwoo
  • Sugar
  • Savant
  • Rain
  • H2o

This example demonstrates how to use the custom Twig view in your Slim Framework application:

<?php
// Setup custom Twig view
$twigView = new \Slim\Extras\Views\Twig();

// Instantiate application
$app = new \Slim\Slim(array(
    'view' => $twigView
));

This example assumes you are autoloading dependencies using Composer. If you are not using Composer, you must manually require the custom view class before instantiating it.

Read the Slim Framework documentation to learn how to write your own custom view.

Middleware

This repository also contains middleware for your Slim Framework application. This example demonstrates how to apply HTTP basic authentication to a Slim Framework application:

<?php
$app = new \Slim\Slim();
$app->add(new \Slim\Extras\Middleware\HttpBasicAuth('username', 'password'));

This example assumes you are autoloading dependencies using Composer. If you are not using Composer, you must manually require the custom middleware class before instantiating it.

Log Writers

This repository also contains custom log writers for your Slim Framwork application. This example demonstrates how to use the custom DateTimeLogWriter to write rolling log files from your Slim Framework application:

<?php
$app = new \Slim\Slim(array(
    'log.writer' => new \Slim\Extras\Log\DateTimeFileWriter(array(
        'path' => './logs',
        'name_format' => 'Y-m-d',
        'message_format' => '%label% - %date% - %message%'
    ))
));

This example assumes you are autoloading dependencies using Composer. If you are not using Composer, you must manually require the log writer class before instantiating it.

Author

The Slim Framework is created and maintained by Josh Lockhart. Josh is a senior web developer at New Media Campaigns. Josh also created and maintains PHP: The Right Way, a popular movement in the PHP community to introduce new PHP programmers to best practices and good information.

The Slim Framework Extras repository is maintained by Andrew Smith.

License

The Slim Framework is released under the MIT public license.

http://www.slimframework.com/license

slim/extras 适用场景与选型建议

slim/extras 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 513.88k 次下载、GitHub Stars 达 482, 最近一次更新时间为 2012 年 03 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「templating」 「extensions」 「middleware」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 513.88k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 491
  • 点击次数: 24
  • 依赖项目数: 13
  • 推荐数: 0

GitHub 信息

  • Stars: 482
  • Watchers: 40
  • Forks: 125
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-03-28