定制 aw/ezp-fetch-bundle 二次开发

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

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

aw/ezp-fetch-bundle

Composer 安装命令:

composer require aw/ezp-fetch-bundle

包简介

A content query language for ezpublish 5

README 文档

README

This project is no longer maintained

AwEzpFetchBundle

Presentation

AwEzpFetchBundle is a facade for the search service. It brings a content query language for eZ Publish 5.

Bundle documentation

The bundle documentation is available in Resources/doc/index.rst

Read the Documentation

Installation

  1. With Composer add the following to your composer.json file, then run composer update command:

        {
            require: {
                "aw/ezp-fetch-bundle": "dev-master",
            }
        }
  2. Register AwEzpFetchBundle by adding following to EzPublishKernel.php file:

    
        <?php
    
        // EzPublishKernel.php
        $bundles = array(
            // ...
            new Aw\Ezp\FetchBundle\AwEzpFetchBundle(),
            // ...
        );

Usage examples

Example 1

<?php

// In controller get the fetch service
$fetcher = $this->get('aw_ezp_fetch');

$query = "{filter: {parent_location_id {EQ 2}}, limit: 20, sort: {date_modified DESC}}";

$result = $fetcher->fetch($query);

Example 2

<?php

// In controller get the fetch service
$fetcher = $this->get('aw_ezp_fetch');

$query = "{filter: {AND [subtree: {EQ '/1/2'}, visibility: {EQ true}]}, limit: 20}";

$result = $fetcher->fetch($query);

Example 3

<?php
// In controller get the fetch service
$fetcher = $this->get('aw_ezp_fetch');

$query = <<<EOS
filter:
      AND:
           - parent_location_id: {IN [2, 60]}
           - date_metadata.modified: {BETWEEN [2012-12-14, 2013-01-25]}
           - visibility: {EQ  true}
           - OR:
              - field.name: {EQ News}
              - full_text: {LIKE 'Press Release*'}

sort: {field.landing_page/name ASC, date_modified DESC}
limit: 12
offset: 14

EOS;

$result = $fetcher->fetch($query);

Example 4

<?php

// In controller get the fetch service
$fetcher = $this->get('aw_ezp_fetch');

$query = <<<EOS
filter:
      AND:
           - parent_location_id: {IN [2, 60]}
           - date_metadata.modified: {BETWEEN [2012-12-14, 2013-01-25]}
           - visibility: {EQ  true}
           - OR:
              - field.name: {EQ News}
              - full_text: {LIKE Press Release*}

sort:
     field.landing_page/name: ASC
     date_modified: DESC

limit: 12
offset: 14

EOS;

$result = $fetcher->fetch($query);

Example 5

<?php

// In controller get the fetch service
$fetcher = $this->get('aw_ezp_fetch');

$query = "{filter: {AND [subtree: {EQ @subtree}, visibility: {EQ true}]}  , limit: @limit, offset: @offset}";

$preparedFetch = $fetcher->prepare($query);

$preparedFetch->bindParam('@subtree', '/1/2');
$preparedFetch->bindParam('@offset', 0);
$preparedFetch->bindParam('@limit', 20);

$result = $preparedFetch->fetch();

//you can rebind any parameter and refetch

$preparedFetch->bindParam('@offset', 20);

$result = $preparedFetch->fetch();

License

The code is released under the MIT License. You can find in Resources/meta/LICENCE

aw/ezp-fetch-bundle 适用场景与选型建议

aw/ezp-fetch-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 44 次下载、GitHub Stars 达 5, 最近一次更新时间为 2013 年 02 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 aw/ezp-fetch-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-12