定制 teqneers/ext-direct-bundle 二次开发

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

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

teqneers/ext-direct-bundle

最新稳定版本:5.0.0

Composer 安装命令:

composer require teqneers/ext-direct-bundle

包简介

A Symfony bundle to integrate Sencha Ext JS Ext.direct into a Symfony application

README 文档

README

A Symfony bundle to integrate Sencha Ext JS Ext.direct into a Symfony application

Build Status

Installation

You can install this bundle using composer

composer require teqneers/ext-direct-bundle

or add the package to your composer.json file directly.

After you have installed the package, you just need to add the bundle to your AppKernel.php file:

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new TQ\Bundle\ExtDirectBundle\TQExtDirectBundle(),
    // ...
);

Configuration

The ext-direct-bundle requires at least one endpoint to be configured.

# Default configuration for "TQExtDirectBundle"
tq_ext_direct:
    debug:                true
    cache:                file
    file_cache_dir:       '%kernel.cache_dir%/tq_ext_direct'
    validate_arguments:   true
    strict_validation:    true
    convert_arguments:    true
    convert_result:       true
    endpoints:            # Required

        # Prototype
        id:
            descriptor:           Ext.app.REMOTING_API
            namespace:            Ext.global
            auto_discover:        true
            all_bundles:          true
            bundles:              []
            directories:          []

auto_discover enables auto-discovering service classes in bundles available to the application. If paired with all_bundles all available bundles are checked, otherwise only bundles mentioned in the bundles array are checked. For bundles it is required to place service classes into an ExtDirect directory inside the bundle root directory. Additionally (or only - if auto_discover is disabled) individual directories can be set to be included in the service discovery process. Services are discovered recursively starting with each configured directory.

Because the bundle provides its own controller to serve the API description and handle Ext.direct reqeusts, you also need to configure your routing to include the bundle routes at a given prefix. Edit your app/config/routing.yml:

# ...
ext_app:
    resource: "@TQExtDirectBundle/Resources/config/routing.yml"
    prefix: /
# ...

The most minimalistic configuration looks like:

tq_ext_direct:
    endpoints:
        api: ~

This enables Ext direct services in all available bundles via the api endpoint.

Usage

Using the Twig extension provided by the bundle you can easily integrate the Ext.direct API definition into your application templates.

<!DOCTYPE HTML>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="UTF-8">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Welcome!</title>

    <!-- Ext JS bootstrap, etc. -->

     <script type="text/javascript" src="{{ extDirectApiPath('api') }}"></script>
</head>
<body>
</body>
</html>

License

The MIT License (MIT)

Copyright (c) 2015 TEQneers GmbH & Co. KG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

teqneers/ext-direct-bundle 适用场景与选型建议

teqneers/ext-direct-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.58k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2015 年 07 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 teqneers/ext-direct-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

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