2011-05-08 21:04:37 +00:00
|
|
|
<?php
|
|
|
|
|
2011-07-03 09:38:38 +00:00
|
|
|
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
2011-05-08 21:04:37 +00:00
|
|
|
|
|
|
|
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
|
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface that must be implemented by the adapater factories
|
|
|
|
*
|
|
|
|
* @author Antoine Hérault <antoine.herault@gmail.com>
|
|
|
|
*/
|
|
|
|
interface AdapterFactoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Creates the adapter, registers it and returns its id
|
|
|
|
*
|
2011-05-13 05:11:59 +00:00
|
|
|
* @param ContainerBuilder $container A ContainerBuilder instance
|
|
|
|
* @param string $id The id of the service
|
|
|
|
* @param array $config An array of configuration
|
2011-05-08 21:04:37 +00:00
|
|
|
*/
|
|
|
|
function create(ContainerBuilder $container, $id, array $config);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the key for the factory configuration
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
function getKey();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds configuration nodes for the factory
|
|
|
|
*
|
|
|
|
* @param NodeBuilder $builder
|
|
|
|
*/
|
|
|
|
function addConfiguration(NodeDefinition $builder);
|
|
|
|
}
|