承接 lokhman/silex-tools 相关项目开发

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

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

lokhman/silex-tools

Composer 安装命令:

composer require lokhman/silex-tools

包简介

Tools for Silex 2.0+ framework

关键字:

README 文档

README

StyleCI

Tools for Silex 2.0+ micro-framework.

Installation

You can install silex-tools with Composer:

composer require lokhman/silex-tools

Components

Suggested Components

Application Container

Class that overrides base Silex\Application class and provides automatic registration of ConfigServiceProvider, error handling and Tools Trait.

use Lokhman\Silex\Application as BaseApplication;

class Application extends BaseApplication {

    public function __construct(array $values = []) {
        $values['config.dir'] = __DIR__.'/../app/config';

        parent::__construct($values);

        // ...
    }

}

Route Class

Class that overrides base Silex\Route class and adds support for SecurityTrait. You can enable it with:

$app['route_class'] = 'Lokhman\Silex\Route';

Twig Service Provider

Extended service provider for traditional TwigServiceProvider that enables support for namespaces in special twig.paths option.

use Lokhman\Silex\Provider\TwigServiceProvider;

$app->register(new TwigServiceProvider(), [
    'twig.paths' => [
        'PublicBundle' => '/path/to/src/PublicBundle/Resources/views',
    ],
]);

$app->render('@PublicBundle/default/index.html.twig');

Tools Trait

Trait to be included in overridden Silex Application class. Provides various useful methods to be used in the container. This trait is automatically included into Application Container.

use Silex\Application as BaseApplication;
use Lokhman\Silex\Application\ToolsTrait;

class Application extends BaseApplication {

    use ToolsTrait;

    public function __construct(array $values = []) {
        parent::__construct($values);
    }

}

License

Library is available under the MIT license. The included LICENSE file describes this in detail.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固