<p dir="auto">Hello,<br>
I would like to know if it's possible to have a prototype with multiple reference inside of it's definition.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="service: ServiceTest
version: 7

request:
    class: MyModel
    properties:
        # other conf..
        Field3:
            type: collection
            field: fieldCollection
            properties:
                Field1:
                    type: string
                    field: fieldString
                Field2:
                    type: collection
                    field: fieldCollection
                    properties:
                        Field1:
                            type: boolean
                            field: fieldBoolean
                        Field2:
                            type: collection
                            field: fieldCollection
                            properties:
                              # ..."><pre class="notranslate"><span class="pl-ent">service</span>: <span class="pl-s">ServiceTest</span>
<span class="pl-ent">version</span>: <span class="pl-c1">7</span>

<span class="pl-ent">request</span>:
    <span class="pl-ent">class</span>: <span class="pl-s">MyModel</span>
    <span class="pl-ent">properties</span>:
        <span class="pl-c"><span class="pl-c">#</span> other conf..</span>
        <span class="pl-ent">Field3</span>:
            <span class="pl-ent">type</span>: <span class="pl-s">collection</span>
            <span class="pl-ent">field</span>: <span class="pl-s">fieldCollection</span>
            <span class="pl-ent">properties</span>:
                <span class="pl-ent">Field1</span>:
                    <span class="pl-ent">type</span>: <span class="pl-s">string</span>
                    <span class="pl-ent">field</span>: <span class="pl-s">fieldString</span>
                <span class="pl-ent">Field2</span>:
                    <span class="pl-ent">type</span>: <span class="pl-s">collection</span>
                    <span class="pl-ent">field</span>: <span class="pl-s">fieldCollection</span>
                    <span class="pl-ent">properties</span>:
                        <span class="pl-ent">Field1</span>:
                            <span class="pl-ent">type</span>: <span class="pl-s">boolean</span>
                            <span class="pl-ent">field</span>: <span class="pl-s">fieldBoolean</span>
                        <span class="pl-ent">Field2</span>:
                            <span class="pl-ent">type</span>: <span class="pl-s">collection</span>
                            <span class="pl-ent">field</span>: <span class="pl-s">fieldCollection</span>
                            <span class="pl-ent">properties</span>:
                              <span class="pl-c"><span class="pl-c">#</span> ...</span></pre></div>
<p dir="auto">I start to write my Configuration but i don't know if it's possible to do what i want.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$rootNode
    -&gt;children()
        -&gt;scalarNode('service')
            -&gt;isRequired()
        -&gt;end()
        -&gt;scalarNode('version')
            -&gt;isRequired()
        -&gt;end()
        -&gt;arrayNode('request')
            -&gt;isRequired()
            -&gt;children()
                -&gt;scalarNode('class')-&gt;end()
                -&gt;arrayNode('properties')
                    -&gt;children()
                        -&gt;useAttributeAsKey('name')
                        -&gt;prototype('array')
                            -&gt;children()
                                -&gt;enumNode('type')
                                    -&gt;values(array(
                                        ServiceProperty::TYPE_STRING,
                                        ServiceProperty::TYPE_INTEGER,
                                        ServiceProperty::TYPE_BOOLEAN,
                                        ServiceProperty::TYPE_COLLECTION
                                    ))
                                -&gt;end()
                                -&gt;scalarNode('field')-&gt;isRequired()-&gt;end()
                                // Refers to the prototype
                             -&gt;end()
                        -&gt;end()
                    -&gt;end()
                -&gt;end()
            -&gt;end()
       -&gt;end()
    -&gt;end()
;"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>rootNode</span>
    -&gt;<span class="pl-en">children</span>()
        -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'service'</span>)
            -&gt;<span class="pl-en">isRequired</span>()
        -&gt;<span class="pl-en">end</span>()
        -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'version'</span>)
            -&gt;<span class="pl-en">isRequired</span>()
        -&gt;<span class="pl-en">end</span>()
        -&gt;<span class="pl-en">arrayNode</span>(<span class="pl-s">'request'</span>)
            -&gt;<span class="pl-en">isRequired</span>()
            -&gt;<span class="pl-en">children</span>()
                -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'class'</span>)-&gt;<span class="pl-en">end</span>()
                -&gt;<span class="pl-en">arrayNode</span>(<span class="pl-s">'properties'</span>)
                    -&gt;<span class="pl-en">children</span>()
                        -&gt;<span class="pl-en">useAttributeAsKey</span>(<span class="pl-s">'name'</span>)
                        -&gt;<span class="pl-en">prototype</span>(<span class="pl-s">'array'</span>)
                            -&gt;<span class="pl-en">children</span>()
                                -&gt;<span class="pl-en">enumNode</span>(<span class="pl-s">'type'</span>)
                                    -&gt;<span class="pl-en">values</span>(<span class="pl-en">array</span>(
                                        <span class="pl-v">ServiceProperty</span>::<span class="pl-c1">TYPE_STRING</span>,
                                        <span class="pl-v">ServiceProperty</span>::<span class="pl-c1">TYPE_INTEGER</span>,
                                        <span class="pl-v">ServiceProperty</span>::<span class="pl-c1">TYPE_BOOLEAN</span>,
                                        <span class="pl-v">ServiceProperty</span>::<span class="pl-c1">TYPE_COLLECTION</span>
                                    ))
                                -&gt;<span class="pl-en">end</span>()
                                -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'field'</span>)-&gt;<span class="pl-en">isRequired</span>()-&gt;<span class="pl-en">end</span>()
                                <span class="pl-c">// Refers to the prototype</span>
                             -&gt;<span class="pl-en">end</span>()
                        -&gt;<span class="pl-en">end</span>()
                    -&gt;<span class="pl-en">end</span>()
                -&gt;<span class="pl-en">end</span>()
            -&gt;<span class="pl-en">end</span>()
       -&gt;<span class="pl-en">end</span>()
    -&gt;<span class="pl-en">end</span>()
;</pre></div>