定制 tamtam/helpers-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tamtam/helpers-bundle

Composer 安装命令:

composer require tamtam/helpers-bundle

包简介

TamTam HelpersBundle for Symfony2

README 文档

README

Helpers bundle for symfony.

Not yet ready for distribution. Need variabilisation of domain and other things before!

Functionalities:

  • Router

Router:

The will here was to have the possibility of accessing the application with different urls and have a corresponding url generation. By this way, we can have a internal network and with [project_code].[user].[domain].[ext], we can reach every project of every developer without any modification. Be Careful that user should be trigram style.

Installation:

composer require tamtam/helpers-bundle

Enable Bundle:

In appKernel.php add the following line:

new TamTam\HelpersBundle\TamTamHelpersBundle(),

Configuration:

For using by explicit call

In app/config/service.yml:

services:
    #Require project_code parameter to be set in config.yml
    tamtam_helpers.generate_url:
        class: TamTam\HelpersBundle\GenerateUrl\GenerateUrl
        arguments: [@router, %project_code%]
        scope: request
    

In app/config/config.yml:

parameters:
    project_code: [your_project_code]

For using directly by the symfony router (only from v1.0.3)

In app/config/service.yml:

parameters:
    router.options.generator_class: TamTam\HelpersBundle\GenerateUrl\GenerateUrl
    router.options.generator_base_class: TamTam\HelpersBundle\GenerateUrl\GenerateUrl
    #@todo need to find a way to pass the project code as argument. It's currently working due to subdomain but with a www. it will not (so right now the following is useless)
    

In app/config/config.yml:

parameters:
    project_code: [your_project_code]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2015-02-05