Update inline documentation.

This commit is contained in:
Falk Doering 2013-08-12 16:53:05 +02:00
parent 02483aca83
commit df1d1855a5

View File

@ -1,35 +1,29 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: falk
* Date: 07.08.13
* Time: 14:25
* To change this template use File | Settings | File Templates.
*/
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Factory;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\Reference;
/**
* doctrine dbal adapter factory
*
* @author Falk Doering <falk.doering@marktjagd.de>
*/
class DoctrineDbalAdapterFactory implements AdapterFactoryInterface
{
/**
* Creates the adapter, registers it and returns its id
*
* @param ContainerBuilder $container A ContainerBuilder instance
* @param string $id The id of the service
* @param array $config An array of configuration
* {@inheritDoc}
*/
function create(ContainerBuilder $container, $id, array $config)
{
$definition = $container
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.doctrine_dbal'))
->addArgument(new Reference($config['doctrine_dbal_id']))
->addArgument($config['table']);
->addArgument($config['table'])
;
if (isset($config['columns'])) {
$definition->addArgument($config['columns']);
@ -37,9 +31,7 @@ class DoctrineDbalAdapterFactory implements AdapterFactoryInterface
}
/**
* Returns the key for the factory configuration
*
* @return string
* {@inheritDoc}
*/
function getKey()
{
@ -47,9 +39,7 @@ class DoctrineDbalAdapterFactory implements AdapterFactoryInterface
}
/**
* Adds configuration nodes for the factory
*
* @param NodeDefinition $builder
* {@inheritDoc}
*/
function addConfiguration(NodeDefinition $builder)
{