<commit_before>[Home](../../index.md) /
[Reference Documents](../index.md) /
[Data Transformer Reference](index.md) /
EntityToIdentifierTransformer

# EntityToIdentifierTransformer

This transformer is used to transform an identifier into a Doctrine entity and vice versa.

## Configuring as a service

### YAML

```yml
task_to_identifier_transformer:
    class: DarkWebDesign\SymfonyAddon\Transformer\EntityToIdentifierTransformer
    arguments: ["@doctrine.orm.entity_manager", "AppBundle\Entity\Task"]
```

### XML

```xml
<service id="task_to_identifier_transformer" class="DarkWebDesign\SymfonyAddon\Transformer\EntityToIdentifierTransformer">
    <argument type="service" id="doctrine.orm.entity_manager" />
    <argument type="string">AppBundle\Entity\Task</argument>
</service>
```
<commit_msg>ISSUE-16: Updated documentation<commit_after>[Home](../../index.md) /
[Reference Documents](../index.md) /
[Data Transformer Reference](index.md) /
EntityToIdentifierTransformer

# EntityToIdentifierTransformer

This transformer is used to transform an identifier into a Doctrine entity and vice versa.

## Configuring as a service

### YAML

```yml
task_to_identifier_transformer:
    class: DarkWebDesign\SymfonyAddon\Transformer\EntityToIdentifierTransformer
    arguments: ["@doctrine.orm.entity_manager", "AppBundle:Task"]
```

### XML

```xml
<service id="task_to_identifier_transformer" class="DarkWebDesign\SymfonyAddon\Transformer\EntityToIdentifierTransformer">
    <argument type="service" id="doctrine.orm.entity_manager" />
    <argument type="string">AppBundle:Task</argument>
</service>
```

{'fraction_non_alphanumeric': 0.13059701492537312, 'fraction_numerical': 0.0012437810945273632, 'mean_word_length': 6.183035714285714, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '416417', 'n_tokens_mistral': 487, 'n_tokens_neox': 464, 'n_words': 94}