tomfun / BranderElasticaSkeletonBundle

symfony 2 bundle for simple elasticsearch query

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BranderElasticaSkeletonBundle

Configurations:

# app/config/config.yml
doctrine_cache:
  aliases:
    brander.bundle.elasticaskeleton.cache_storage: my_apc_cache # or other

  providers:
    my_apc_cache:
      type: apc # or other cacher
      namespace: my_apc_cache_ns
#     namespace: "%kernel.root_dir%/%kernel.environment%/%assets_version%"
<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
            new \Brander\Bundle\ElasticaSkeletonBundle\BranderElasticaSkeletonBundle(),
        );
        // ...
    }
    // ...
}

This just doctrine cache bundle configuration BranderElasticaSkeletonBundle require some cache adapter by alias brander.bundle.elasticaskeleton.cache_storage

Example of list service (wrapper over fos elastica finder)

# services.yml
services:
 my_bundle.elastica_list.entity:
   class: Iwin\Bundle\UserBundle\Entity\Query\UserElasticaList
   parent: brander.bundle.elasticaskeleton.list # elastica skeleton abstract
   arguments:
     - @fos_elastica.finder.iwin_user.user # fos elastica finder

About

symfony 2 bundle for simple elasticsearch query


Languages

Language:PHP 75.0%Language:JavaScript 25.0%