| 
                    1
                 | 
                                    
                                                     | 
                
                 | 
                <?php  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    2
                 | 
                                    
                                                     | 
                
                 | 
                /*  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    3
                 | 
                                    
                                                     | 
                
                 | 
                 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    4
                 | 
                                    
                                                     | 
                
                 | 
                 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    5
                 | 
                                    
                                                     | 
                
                 | 
                 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    6
                 | 
                                    
                                                     | 
                
                 | 
                 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    7
                 | 
                                    
                                                     | 
                
                 | 
                 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    8
                 | 
                                    
                                                     | 
                
                 | 
                 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    9
                 | 
                                    
                                                     | 
                
                 | 
                 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    10
                 | 
                                    
                                                     | 
                
                 | 
                 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    11
                 | 
                                    
                                                     | 
                
                 | 
                 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    12
                 | 
                                    
                                                     | 
                
                 | 
                 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    13
                 | 
                                    
                                                     | 
                
                 | 
                 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    14
                 | 
                                    
                                                     | 
                
                 | 
                 *  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    15
                 | 
                                    
                                                     | 
                
                 | 
                 * This software consists of voluntary contributions made by many individuals  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    16
                 | 
                                    
                                                     | 
                
                 | 
                 * and is licensed under the MIT license. For more information, see  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    17
                 | 
                                    
                                                     | 
                
                 | 
                 * <http://www.doctrine-project.org>.  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    18
                 | 
                                    
                                                     | 
                
                 | 
                 */  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    19
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    20
                 | 
                                    
                                                     | 
                
                 | 
                namespace Doctrine\ORM\Mapping\Driver;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    21
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    22
                 | 
                                    
                                                     | 
                
                 | 
                use Doctrine\Common\Collections\Criteria;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    23
                 | 
                                    
                                                     | 
                
                 | 
                use SimpleXMLElement;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    24
                 | 
                                    
                                                     | 
                
                 | 
                use Doctrine\Common\Persistence\Mapping\Driver\FileDriver;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    25
                 | 
                                    
                                                     | 
                
                 | 
                use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    26
                 | 
                                    
                                                     | 
                
                 | 
                use Doctrine\Common\Persistence\Mapping\ClassMetadata;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    27
                 | 
                                    
                                                     | 
                
                 | 
                use Doctrine\ORM\Mapping\MappingException;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    28
                 | 
                                    
                                                     | 
                
                 | 
                use Doctrine\ORM\Mapping\ClassMetadata as Metadata;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    29
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    30
                 | 
                                    
                                                     | 
                
                 | 
                /**  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    31
                 | 
                                    
                                                     | 
                
                 | 
                 * XmlDriver is a metadata driver that enables mapping through XML files.  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    32
                 | 
                                    
                                                     | 
                
                 | 
                 *  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    33
                 | 
                                    
                                                     | 
                
                 | 
                 * @license 	http://www.opensource.org/licenses/mit-license.php MIT  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    34
                 | 
                                    
                                                     | 
                
                 | 
                 * @link    	www.doctrine-project.org  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    35
                 | 
                                    
                                                     | 
                
                 | 
                 * @since   	2.0  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    36
                 | 
                                    
                                                     | 
                
                 | 
                 * @author		Benjamin Eberlei <[email protected]>  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    37
                 | 
                                    
                                                     | 
                
                 | 
                 * @author		Guilherme Blanco <[email protected]>  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    38
                 | 
                                    
                                                     | 
                
                 | 
                 * @author      Jonathan H. Wage <[email protected]>  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    39
                 | 
                                    
                                                     | 
                
                 | 
                 * @author      Roman Borschel <[email protected]>  | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    40
                 | 
                                    
                                                     | 
                
                 | 
                 */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    41
                 | 
                                    
                                                     | 
                
                 | 
                class XmlDriver extends FileDriver  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    42
                 | 
                                    
                                                     | 
                
                 | 
                { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    43
                 | 
                                    
                                                     | 
                
                 | 
                    const DEFAULT_FILE_EXTENSION = '.dcm.xml';  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    44
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    45
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    46
                 | 
                                    
                                                     | 
                
                 | 
                     * {@inheritDoc} | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    47
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    48
                 | 
                                    
                             43                          | 
                
                 | 
                    public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    49
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    50
                 | 
                                    
                             43                          | 
                
                 | 
                        parent::__construct($locator, $fileExtension);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    51
                 | 
                                    
                             43                          | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    52
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    53
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    54
                 | 
                                    
                                                     | 
                
                 | 
                     * {@inheritDoc} | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    55
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    56
                 | 
                                    
                             38                          | 
                
                 | 
                    public function loadMetadataForClass($className, ClassMetadata $metadata)  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    57
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    58
                 | 
                                    
                                                     | 
                
                 | 
                        /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    59
                 | 
                                    
                                                     | 
                
                 | 
                        /* @var $xmlRoot SimpleXMLElement */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    60
                 | 
                                    
                             38                          | 
                
                 | 
                        $xmlRoot = $this->getElement($className);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    61
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    62
                 | 
                                    
                             35                          | 
                
                 | 
                        if ($xmlRoot->getName() == 'entity') { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    63
                 | 
                                    
                             34                          | 
                
                 | 
                            if (isset($xmlRoot['repository-class'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    64
                 | 
                                    
                                                     | 
                
                 | 
                                $metadata->setCustomRepositoryClass((string) $xmlRoot['repository-class']);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    65
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    66
                 | 
                                    
                             34                          | 
                
                 | 
                            if (isset($xmlRoot['read-only']) && $this->evaluateBoolean($xmlRoot['read-only'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    67
                 | 
                                    
                             34                          | 
                
                 | 
                                $metadata->markReadOnly();  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    68
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    69
                 | 
                                    
                             8                          | 
                
                 | 
                        } else if ($xmlRoot->getName() == 'mapped-superclass') { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    70
                 | 
                                    
                             5                          | 
                
                 | 
                            $metadata->setCustomRepositoryClass(  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    71
                 | 
                                    
                             5                          | 
                
                 | 
                                isset($xmlRoot['repository-class']) ? (string) $xmlRoot['repository-class'] : null  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    72
                 | 
                                    
                                                     | 
                
                 | 
                            );  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    73
                 | 
                                    
                             5                          | 
                
                 | 
                            $metadata->isMappedSuperclass = true;  | 
            
                            
                    | 
                        
                     | 
                     | 
                     | 
                    
                                                                                                    
                        
                         
                                                                                        
                                                                                     
                     | 
                
            
                                                                        
                            
            
                                    
            
            
                | 
                    74
                 | 
                                    
                             3                          | 
                
                 | 
                        } else if ($xmlRoot->getName() == 'embeddable') { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    75
                 | 
                                    
                             3                          | 
                
                 | 
                            $metadata->isEmbeddedClass = true;  | 
            
                            
                    | 
                        
                     | 
                     | 
                     | 
                    
                                                                                                    
                        
                         
                                                                                        
                                                                                     
                     | 
                
            
                                                                        
                            
            
                                    
            
            
                | 
                    76
                 | 
                                    
                                                     | 
                
                 | 
                        } else { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    77
                 | 
                                    
                                                     | 
                
                 | 
                            throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    78
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    79
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    80
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <entity...> attributes  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    81
                 | 
                                    
                             35                          | 
                
                 | 
                        $primaryTable = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    82
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    83
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot['table'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    84
                 | 
                                    
                             13                          | 
                
                 | 
                            $primaryTable['name'] = (string) $xmlRoot['table'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    85
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    86
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    87
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot['schema'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    88
                 | 
                                    
                             1                          | 
                
                 | 
                            $primaryTable['schema'] = (string) $xmlRoot['schema'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    89
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    90
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    91
                 | 
                                    
                             35                          | 
                
                 | 
                        $metadata->setPrimaryTable($primaryTable);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    92
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    93
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate second level cache  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    94
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->cache)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    95
                 | 
                                    
                             2                          | 
                
                 | 
                            $metadata->enableCache($this->cacheToArray($xmlRoot->cache));  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    96
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    97
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    98
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate named queries  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    99
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->{'named-queries'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    100
                 | 
                                    
                             4                          | 
                
                 | 
                            foreach ($xmlRoot->{'named-queries'}->{'named-query'} as $namedQueryElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    101
                 | 
                                    
                             4                          | 
                
                 | 
                                $metadata->addNamedQuery(  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    102
                 | 
                                    
                                                     | 
                
                 | 
                                    [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    103
                 | 
                                    
                             4                          | 
                
                 | 
                                        'name'  => (string) $namedQueryElement['name'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    104
                 | 
                                    
                             4                          | 
                
                 | 
                                        'query' => (string) $namedQueryElement['query']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    105
                 | 
                                    
                                                     | 
                
                 | 
                                    ]  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    106
                 | 
                                    
                                                     | 
                
                 | 
                                );  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    107
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    108
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    109
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    110
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate native named queries  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    111
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->{'named-native-queries'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    112
                 | 
                                    
                             3                          | 
                
                 | 
                            foreach ($xmlRoot->{'named-native-queries'}->{'named-native-query'} as $nativeQueryElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    113
                 | 
                                    
                             3                          | 
                
                 | 
                                $metadata->addNamedNativeQuery(  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    114
                 | 
                                    
                                                     | 
                
                 | 
                                    [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    115
                 | 
                                    
                             3                          | 
                
                 | 
                                        'name'              => isset($nativeQueryElement['name']) ? (string) $nativeQueryElement['name'] : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    116
                 | 
                                    
                             3                          | 
                
                 | 
                                        'query'             => isset($nativeQueryElement->query) ? (string) $nativeQueryElement->query : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    117
                 | 
                                    
                             3                          | 
                
                 | 
                                        'resultClass'       => isset($nativeQueryElement['result-class']) ? (string) $nativeQueryElement['result-class'] : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    118
                 | 
                                    
                             3                          | 
                
                 | 
                                        'resultSetMapping'  => isset($nativeQueryElement['result-set-mapping']) ? (string) $nativeQueryElement['result-set-mapping'] : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    119
                 | 
                                    
                                                     | 
                
                 | 
                                    ]  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    120
                 | 
                                    
                                                     | 
                
                 | 
                                );  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    121
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    122
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    123
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    124
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate sql result set mapping  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    125
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->{'sql-result-set-mappings'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    126
                 | 
                                    
                             3                          | 
                
                 | 
                            foreach ($xmlRoot->{'sql-result-set-mappings'}->{'sql-result-set-mapping'} as $rsmElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    127
                 | 
                                    
                             3                          | 
                
                 | 
                                $entities   = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    128
                 | 
                                    
                             3                          | 
                
                 | 
                                $columns    = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    129
                 | 
                                    
                             3                          | 
                
                 | 
                                foreach ($rsmElement as $entityElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    130
                 | 
                                    
                                                     | 
                
                 | 
                                    //<entity-result/>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    131
                 | 
                                    
                             3                          | 
                
                 | 
                                    if (isset($entityElement['entity-class'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    132
                 | 
                                    
                                                     | 
                
                 | 
                                        $entityResult = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    133
                 | 
                                    
                             3                          | 
                
                 | 
                                            'fields'                => [],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    134
                 | 
                                    
                             3                          | 
                
                 | 
                                            'entityClass'           => (string) $entityElement['entity-class'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    135
                 | 
                                    
                             3                          | 
                
                 | 
                                            'discriminatorColumn'   => isset($entityElement['discriminator-column']) ? (string) $entityElement['discriminator-column'] : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    136
                 | 
                                    
                                                     | 
                
                 | 
                                        ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    137
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    138
                 | 
                                    
                             3                          | 
                
                 | 
                                        foreach ($entityElement as $fieldElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    139
                 | 
                                    
                             3                          | 
                
                 | 
                                            $entityResult['fields'][] = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    140
                 | 
                                    
                             3                          | 
                
                 | 
                                                'name'      => isset($fieldElement['name']) ? (string) $fieldElement['name'] : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    141
                 | 
                                    
                             3                          | 
                
                 | 
                                                'column'    => isset($fieldElement['column']) ? (string) $fieldElement['column'] : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    142
                 | 
                                    
                                                     | 
                
                 | 
                                            ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    143
                 | 
                                    
                                                     | 
                
                 | 
                                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    144
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    145
                 | 
                                    
                             3                          | 
                
                 | 
                                        $entities[] = $entityResult;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    146
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    147
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    148
                 | 
                                    
                                                     | 
                
                 | 
                                    //<column-result/>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    149
                 | 
                                    
                             3                          | 
                
                 | 
                                    if (isset($entityElement['name'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    150
                 | 
                                    
                             3                          | 
                
                 | 
                                        $columns[] = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    151
                 | 
                                    
                             3                          | 
                
                 | 
                                            'name' => (string) $entityElement['name'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    152
                 | 
                                    
                                                     | 
                
                 | 
                                        ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    153
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    154
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    155
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    156
                 | 
                                    
                             3                          | 
                
                 | 
                                $metadata->addSqlResultSetMapping(  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    157
                 | 
                                    
                                                     | 
                
                 | 
                                    [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    158
                 | 
                                    
                             3                          | 
                
                 | 
                                        'name'          => (string) $rsmElement['name'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    159
                 | 
                                    
                             3                          | 
                
                 | 
                                        'entities'      => $entities,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    160
                 | 
                                    
                             3                          | 
                
                 | 
                                        'columns'       => $columns  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    161
                 | 
                                    
                                                     | 
                
                 | 
                                    ]  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    162
                 | 
                                    
                                                     | 
                
                 | 
                                );  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    163
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    164
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    165
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    166
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot['inheritance-type'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    167
                 | 
                                    
                             10                          | 
                
                 | 
                            $inheritanceType = (string) $xmlRoot['inheritance-type'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    168
                 | 
                                    
                             10                          | 
                
                 | 
                            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType)); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    169
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    170
                 | 
                                    
                             10                          | 
                
                 | 
                            if ($metadata->inheritanceType != Metadata::INHERITANCE_TYPE_NONE) { | 
            
                            
                    | 
                        
                     | 
                     | 
                     | 
                    
                                                                                                    
                        
                         
                                                                                        
                                                                                     
                     | 
                
            
                                                                        
                            
            
                                    
            
            
                | 
                    171
                 | 
                                    
                                                     | 
                
                 | 
                                // Evaluate <discriminator-column...>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    172
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($xmlRoot->{'discriminator-column'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    173
                 | 
                                    
                             7                          | 
                
                 | 
                                    $discrColumn = $xmlRoot->{'discriminator-column'}; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    174
                 | 
                                    
                             7                          | 
                
                 | 
                                    $metadata->setDiscriminatorColumn(  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    175
                 | 
                                    
                                                     | 
                
                 | 
                                        [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    176
                 | 
                                    
                             7                          | 
                
                 | 
                                            'name' => isset($discrColumn['name']) ? (string) $discrColumn['name'] : null,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    177
                 | 
                                    
                             7                          | 
                
                 | 
                                            'type' => isset($discrColumn['type']) ? (string) $discrColumn['type'] : 'string',  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    178
                 | 
                                    
                             7                          | 
                
                 | 
                                            'length' => isset($discrColumn['length']) ? (string) $discrColumn['length'] : 255,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    179
                 | 
                                    
                             7                          | 
                
                 | 
                                            'columnDefinition' => isset($discrColumn['column-definition']) ? (string) $discrColumn['column-definition'] : null  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    180
                 | 
                                    
                                                     | 
                
                 | 
                                        ]  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    181
                 | 
                                    
                                                     | 
                
                 | 
                                    );  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    182
                 | 
                                    
                                                     | 
                
                 | 
                                } else { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    183
                 | 
                                    
                             6                          | 
                
                 | 
                                    $metadata->setDiscriminatorColumn(['name' => 'dtype', 'type' => 'string', 'length' => 255]);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    184
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    185
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    186
                 | 
                                    
                                                     | 
                
                 | 
                                // Evaluate <discriminator-map...>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    187
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($xmlRoot->{'discriminator-map'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    188
                 | 
                                    
                             10                          | 
                
                 | 
                                    $map = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    189
                 | 
                                    
                             10                          | 
                
                 | 
                                    foreach ($xmlRoot->{'discriminator-map'}->{'discriminator-mapping'} as $discrMapElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    190
                 | 
                                    
                             10                          | 
                
                 | 
                                        $map[(string) $discrMapElement['value']] = (string) $discrMapElement['class'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    191
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    192
                 | 
                                    
                             10                          | 
                
                 | 
                                    $metadata->setDiscriminatorMap($map);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    193
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    194
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    195
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    196
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    197
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    198
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <change-tracking-policy...>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    199
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot['change-tracking-policy'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    200
                 | 
                                    
                                                     | 
                
                 | 
                            $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    201
                 | 
                                    
                                                     | 
                
                 | 
                                . strtoupper((string) $xmlRoot['change-tracking-policy'])));  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    202
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    203
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    204
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <indexes...>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    205
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->indexes)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    206
                 | 
                                    
                             4                          | 
                
                 | 
                            $metadata->table['indexes'] = [];  | 
            
                            
                    | 
                        
                     | 
                     | 
                     | 
                    
                                                                                                    
                        
                         
                                                                                        
                                                                                     
                     | 
                
            
                                                                        
                            
            
                                    
            
            
                | 
                    207
                 | 
                                    
                             4                          | 
                
                 | 
                            foreach ($xmlRoot->indexes->index as $indexXml) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    208
                 | 
                                    
                             4                          | 
                
                 | 
                                $index = ['columns' => explode(',', (string) $indexXml['columns'])]; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    209
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    210
                 | 
                                    
                             4                          | 
                
                 | 
                                if (isset($indexXml['flags'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    211
                 | 
                                    
                             1                          | 
                
                 | 
                                    $index['flags'] = explode(',', (string) $indexXml['flags']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    212
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    213
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    214
                 | 
                                    
                             4                          | 
                
                 | 
                                if (isset($indexXml->options)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    215
                 | 
                                    
                             1                          | 
                
                 | 
                                    $index['options'] = $this->_parseOptions($indexXml->options->children());  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    216
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    217
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    218
                 | 
                                    
                             4                          | 
                
                 | 
                                if (isset($indexXml['name'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    219
                 | 
                                    
                             3                          | 
                
                 | 
                                    $metadata->table['indexes'][(string) $indexXml['name']] = $index;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    220
                 | 
                                    
                                                     | 
                
                 | 
                                } else { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    221
                 | 
                                    
                             4                          | 
                
                 | 
                                    $metadata->table['indexes'][] = $index;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    222
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    223
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    224
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    225
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    226
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <unique-constraints..>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    227
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->{'unique-constraints'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    228
                 | 
                                    
                             3                          | 
                
                 | 
                            $metadata->table['uniqueConstraints'] = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    229
                 | 
                                    
                             3                          | 
                
                 | 
                            foreach ($xmlRoot->{'unique-constraints'}->{'unique-constraint'} as $uniqueXml) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    230
                 | 
                                    
                             3                          | 
                
                 | 
                                $unique = ['columns' => explode(',', (string) $uniqueXml['columns'])]; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    231
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    232
                 | 
                                    
                             3                          | 
                
                 | 
                                if (isset($uniqueXml->options)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    233
                 | 
                                    
                             3                          | 
                
                 | 
                                    $unique['options'] = $this->_parseOptions($uniqueXml->options->children());  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    234
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    235
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    236
                 | 
                                    
                             3                          | 
                
                 | 
                                if (isset($uniqueXml['name'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    237
                 | 
                                    
                             3                          | 
                
                 | 
                                    $metadata->table['uniqueConstraints'][(string) $uniqueXml['name']] = $unique;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    238
                 | 
                                    
                                                     | 
                
                 | 
                                } else { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    239
                 | 
                                    
                             3                          | 
                
                 | 
                                    $metadata->table['uniqueConstraints'][] = $unique;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    240
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    241
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    242
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    243
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    244
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->options)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    245
                 | 
                                    
                             3                          | 
                
                 | 
                            $metadata->table['options'] = $this->_parseOptions($xmlRoot->options->children());  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    246
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    247
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    248
                 | 
                                    
                                                     | 
                
                 | 
                        // The mapping assignment is done in 2 times as a bug might occurs on some php/xml lib versions  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    249
                 | 
                                    
                                                     | 
                
                 | 
                        // The internal SimpleXmlIterator get resetted, to this generate a duplicate field exception  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    250
                 | 
                                    
                             35                          | 
                
                 | 
                        $mappings = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    251
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <field ...> mappings  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    252
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->field)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    253
                 | 
                                    
                             22                          | 
                
                 | 
                            foreach ($xmlRoot->field as $fieldMapping) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    254
                 | 
                                    
                             22                          | 
                
                 | 
                                $mapping = $this->columnToArray($fieldMapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    255
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    256
                 | 
                                    
                             22                          | 
                
                 | 
                                if (isset($mapping['version'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    257
                 | 
                                    
                             3                          | 
                
                 | 
                                    $metadata->setVersionMapping($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    258
                 | 
                                    
                             3                          | 
                
                 | 
                                    unset($mapping['version']);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    259
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    260
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    261
                 | 
                                    
                             22                          | 
                
                 | 
                                $metadata->mapField($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    262
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    263
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    264
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    265
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->embedded)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    266
                 | 
                                    
                             3                          | 
                
                 | 
                            foreach ($xmlRoot->embedded as $embeddedMapping) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    267
                 | 
                                    
                             3                          | 
                
                 | 
                                $columnPrefix = isset($embeddedMapping['column-prefix'])  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    268
                 | 
                                    
                             3                          | 
                
                 | 
                                    ? (string) $embeddedMapping['column-prefix']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    269
                 | 
                                    
                             3                          | 
                
                 | 
                                    : null;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    270
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    271
                 | 
                                    
                             3                          | 
                
                 | 
                                $useColumnPrefix = isset($embeddedMapping['use-column-prefix'])  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    272
                 | 
                                    
                             2                          | 
                
                 | 
                                    ? $this->evaluateBoolean($embeddedMapping['use-column-prefix'])  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    273
                 | 
                                    
                             3                          | 
                
                 | 
                                    : true;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    274
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    275
                 | 
                                    
                                                     | 
                
                 | 
                                $mapping = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    276
                 | 
                                    
                             3                          | 
                
                 | 
                                    'fieldName' => (string) $embeddedMapping['name'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    277
                 | 
                                    
                             3                          | 
                
                 | 
                                    'class' => (string) $embeddedMapping['class'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    278
                 | 
                                    
                             3                          | 
                
                 | 
                                    'columnPrefix' => $useColumnPrefix ? $columnPrefix : false  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    279
                 | 
                                    
                                                     | 
                
                 | 
                                ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    280
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    281
                 | 
                                    
                             3                          | 
                
                 | 
                                $metadata->mapEmbedded($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    282
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    283
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    284
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    285
                 | 
                                    
                             35                          | 
                
                 | 
                        foreach ($mappings as $mapping) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    286
                 | 
                                    
                                                     | 
                
                 | 
                            if (isset($mapping['version'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    287
                 | 
                                    
                                                     | 
                
                 | 
                                $metadata->setVersionMapping($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    288
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    289
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    290
                 | 
                                    
                                                     | 
                
                 | 
                            $metadata->mapField($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    291
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    292
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    293
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <id ...> mappings  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    294
                 | 
                                    
                             35                          | 
                
                 | 
                        $associationIds = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    295
                 | 
                                    
                             35                          | 
                
                 | 
                        foreach ($xmlRoot->id as $idElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    296
                 | 
                                    
                             31                          | 
                
                 | 
                            if (isset($idElement['association-key']) && $this->evaluateBoolean($idElement['association-key'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    297
                 | 
                                    
                             2                          | 
                
                 | 
                                $associationIds[(string) $idElement['name']] = true;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    298
                 | 
                                    
                             2                          | 
                
                 | 
                                continue;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    299
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    300
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    301
                 | 
                                    
                                                     | 
                
                 | 
                            $mapping = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    302
                 | 
                                    
                             30                          | 
                
                 | 
                                'id' => true,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    303
                 | 
                                    
                             30                          | 
                
                 | 
                                'fieldName' => (string) $idElement['name']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    304
                 | 
                                    
                                                     | 
                
                 | 
                            ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    305
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    306
                 | 
                                    
                             30                          | 
                
                 | 
                            if (isset($idElement['type'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    307
                 | 
                                    
                             19                          | 
                
                 | 
                                $mapping['type'] = (string) $idElement['type'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    308
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    309
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    310
                 | 
                                    
                             30                          | 
                
                 | 
                            if (isset($idElement['length'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    311
                 | 
                                    
                             3                          | 
                
                 | 
                                $mapping['length'] = (string) $idElement['length'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    312
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    313
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    314
                 | 
                                    
                             30                          | 
                
                 | 
                            if (isset($idElement['column'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    315
                 | 
                                    
                             21                          | 
                
                 | 
                                $mapping['columnName'] = (string) $idElement['column'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    316
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    317
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    318
                 | 
                                    
                             30                          | 
                
                 | 
                            if (isset($idElement['column-definition'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    319
                 | 
                                    
                             1                          | 
                
                 | 
                                $mapping['columnDefinition'] = (string) $idElement['column-definition'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    320
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    321
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    322
                 | 
                                    
                             30                          | 
                
                 | 
                            if (isset($idElement->options)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    323
                 | 
                                    
                             3                          | 
                
                 | 
                                $mapping['options'] = $this->_parseOptions($idElement->options->children());  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    324
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    325
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    326
                 | 
                                    
                             30                          | 
                
                 | 
                            $metadata->mapField($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    327
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    328
                 | 
                                    
                             30                          | 
                
                 | 
                            if (isset($idElement->generator)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    329
                 | 
                                    
                             29                          | 
                
                 | 
                                $strategy = isset($idElement->generator['strategy']) ?  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    330
                 | 
                                    
                             29                          | 
                
                 | 
                                        (string) $idElement->generator['strategy'] : 'AUTO';  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    331
                 | 
                                    
                             29                          | 
                
                 | 
                                $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    332
                 | 
                                    
                             29                          | 
                
                 | 
                                    . $strategy));  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    333
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    334
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    335
                 | 
                                    
                                                     | 
                
                 | 
                            // Check for SequenceGenerator/TableGenerator definition  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    336
                 | 
                                    
                             30                          | 
                
                 | 
                            if (isset($idElement->{'sequence-generator'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    337
                 | 
                                    
                             3                          | 
                
                 | 
                                $seqGenerator = $idElement->{'sequence-generator'}; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    338
                 | 
                                    
                             3                          | 
                
                 | 
                                $metadata->setSequenceGeneratorDefinition(  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    339
                 | 
                                    
                                                     | 
                
                 | 
                                    [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    340
                 | 
                                    
                             3                          | 
                
                 | 
                                        'sequenceName' => (string) $seqGenerator['sequence-name'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    341
                 | 
                                    
                             3                          | 
                
                 | 
                                        'allocationSize' => (string) $seqGenerator['allocation-size'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    342
                 | 
                                    
                             3                          | 
                
                 | 
                                        'initialValue' => (string) $seqGenerator['initial-value']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    343
                 | 
                                    
                                                     | 
                
                 | 
                                    ]  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    344
                 | 
                                    
                                                     | 
                
                 | 
                                );  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    345
                 | 
                                    
                             27                          | 
                
                 | 
                            } else if (isset($idElement->{'custom-id-generator'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    346
                 | 
                                    
                             2                          | 
                
                 | 
                                $customGenerator = $idElement->{'custom-id-generator'}; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    347
                 | 
                                    
                             2                          | 
                
                 | 
                                $metadata->setCustomGeneratorDefinition(  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    348
                 | 
                                    
                                                     | 
                
                 | 
                                    [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    349
                 | 
                                    
                             2                          | 
                
                 | 
                                        'class' => (string) $customGenerator['class']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    350
                 | 
                                    
                                                     | 
                
                 | 
                                    ]  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    351
                 | 
                                    
                                                     | 
                
                 | 
                                );  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    352
                 | 
                                    
                             25                          | 
                
                 | 
                            } else if (isset($idElement->{'table-generator'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    353
                 | 
                                    
                             30                          | 
                
                 | 
                                throw MappingException::tableIdGeneratorNotImplemented($className);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    354
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    355
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    356
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    357
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <one-to-one ...> mappings  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    358
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->{'one-to-one'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    359
                 | 
                                    
                             6                          | 
                
                 | 
                            foreach ($xmlRoot->{'one-to-one'} as $oneToOneElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    360
                 | 
                                    
                                                     | 
                
                 | 
                                $mapping = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    361
                 | 
                                    
                             6                          | 
                
                 | 
                                    'fieldName' => (string) $oneToOneElement['field'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    362
                 | 
                                    
                             6                          | 
                
                 | 
                                    'targetEntity' => (string) $oneToOneElement['target-entity']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    363
                 | 
                                    
                                                     | 
                
                 | 
                                ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    364
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    365
                 | 
                                    
                             6                          | 
                
                 | 
                                if (isset($associationIds[$mapping['fieldName']])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    366
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['id'] = true;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    367
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    368
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    369
                 | 
                                    
                             6                          | 
                
                 | 
                                if (isset($oneToOneElement['fetch'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    370
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToOneElement['fetch']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    371
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    372
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    373
                 | 
                                    
                             6                          | 
                
                 | 
                                if (isset($oneToOneElement['mapped-by'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    374
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['mappedBy'] = (string) $oneToOneElement['mapped-by'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    375
                 | 
                                    
                                                     | 
                
                 | 
                                } else { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    376
                 | 
                                    
                             6                          | 
                
                 | 
                                    if (isset($oneToOneElement['inversed-by'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    377
                 | 
                                    
                             6                          | 
                
                 | 
                                        $mapping['inversedBy'] = (string) $oneToOneElement['inversed-by'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    378
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    379
                 | 
                                    
                             6                          | 
                
                 | 
                                    $joinColumns = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    380
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    381
                 | 
                                    
                             6                          | 
                
                 | 
                                    if (isset($oneToOneElement->{'join-column'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    382
                 | 
                                    
                             6                          | 
                
                 | 
                                        $joinColumns[] = $this->joinColumnToArray($oneToOneElement->{'join-column'}); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    383
                 | 
                                    
                                                     | 
                
                 | 
                                    } else if (isset($oneToOneElement->{'join-columns'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    384
                 | 
                                    
                                                     | 
                
                 | 
                                        foreach ($oneToOneElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    385
                 | 
                                    
                                                     | 
                
                 | 
                                            $joinColumns[] = $this->joinColumnToArray($joinColumnElement);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    386
                 | 
                                    
                                                     | 
                
                 | 
                                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    387
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    388
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    389
                 | 
                                    
                             6                          | 
                
                 | 
                                    $mapping['joinColumns'] = $joinColumns;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    390
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    391
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    392
                 | 
                                    
                             6                          | 
                
                 | 
                                if (isset($oneToOneElement->cascade)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    393
                 | 
                                    
                             4                          | 
                
                 | 
                                    $mapping['cascade'] = $this->_getCascadeMappings($oneToOneElement->cascade);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    394
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    395
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    396
                 | 
                                    
                             6                          | 
                
                 | 
                                if (isset($oneToOneElement['orphan-removal'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    397
                 | 
                                    
                             1                          | 
                
                 | 
                                    $mapping['orphanRemoval'] = $this->evaluateBoolean($oneToOneElement['orphan-removal']);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    398
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    399
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    400
                 | 
                                    
                                                     | 
                
                 | 
                                // Evaluate second level cache  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    401
                 | 
                                    
                             6                          | 
                
                 | 
                                if (isset($oneToOneElement->cache)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    402
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($oneToOneElement->cache));  | 
            
                            
                    | 
                        
                     | 
                     | 
                     | 
                    
                                                                                                    
                        
                         
                                                                                        
                                                                                     
                     | 
                
            
                                                                        
                            
            
                                    
            
            
                | 
                    403
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    404
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    405
                 | 
                                    
                             6                          | 
                
                 | 
                                $metadata->mapOneToOne($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    406
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    407
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    408
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    409
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <one-to-many ...> mappings  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    410
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->{'one-to-many'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    411
                 | 
                                    
                             7                          | 
                
                 | 
                            foreach ($xmlRoot->{'one-to-many'} as $oneToManyElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    412
                 | 
                                    
                                                     | 
                
                 | 
                                $mapping = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    413
                 | 
                                    
                             7                          | 
                
                 | 
                                    'fieldName' => (string) $oneToManyElement['field'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    414
                 | 
                                    
                             7                          | 
                
                 | 
                                    'targetEntity' => (string) $oneToManyElement['target-entity'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    415
                 | 
                                    
                             7                          | 
                
                 | 
                                    'mappedBy' => (string) $oneToManyElement['mapped-by']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    416
                 | 
                                    
                                                     | 
                
                 | 
                                ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    417
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    418
                 | 
                                    
                             7                          | 
                
                 | 
                                if (isset($oneToManyElement['fetch'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    419
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToManyElement['fetch']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    420
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    421
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    422
                 | 
                                    
                             7                          | 
                
                 | 
                                if (isset($oneToManyElement->cascade)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    423
                 | 
                                    
                             4                          | 
                
                 | 
                                    $mapping['cascade'] = $this->_getCascadeMappings($oneToManyElement->cascade);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    424
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    425
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    426
                 | 
                                    
                             7                          | 
                
                 | 
                                if (isset($oneToManyElement['orphan-removal'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    427
                 | 
                                    
                             4                          | 
                
                 | 
                                    $mapping['orphanRemoval'] = $this->evaluateBoolean($oneToManyElement['orphan-removal']);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    428
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    429
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    430
                 | 
                                    
                             7                          | 
                
                 | 
                                if (isset($oneToManyElement->{'order-by'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    431
                 | 
                                    
                             5                          | 
                
                 | 
                                    $orderBy = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    432
                 | 
                                    
                             5                          | 
                
                 | 
                                    foreach ($oneToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    433
                 | 
                                    
                             5                          | 
                
                 | 
                                        $orderBy[(string) $orderByField['name']] = isset($orderByField['direction'])  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    434
                 | 
                                    
                             4                          | 
                
                 | 
                                            ? (string) $orderByField['direction']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    435
                 | 
                                    
                             5                          | 
                
                 | 
                                            : Criteria::ASC  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    436
                 | 
                                    
                                                     | 
                
                 | 
                                        ;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    437
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    438
                 | 
                                    
                             5                          | 
                
                 | 
                                    $mapping['orderBy'] = $orderBy;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    439
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    440
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    441
                 | 
                                    
                             7                          | 
                
                 | 
                                if (isset($oneToManyElement['index-by'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    442
                 | 
                                    
                             3                          | 
                
                 | 
                                    $mapping['indexBy'] = (string) $oneToManyElement['index-by'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    443
                 | 
                                    
                             4                          | 
                
                 | 
                                } else if (isset($oneToManyElement->{'index-by'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    444
                 | 
                                    
                                                     | 
                
                 | 
                                    throw new \InvalidArgumentException("<index-by /> is not a valid tag"); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    445
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    446
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    447
                 | 
                                    
                                                     | 
                
                 | 
                                // Evaluate second level cache  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    448
                 | 
                                    
                             7                          | 
                
                 | 
                                if (isset($oneToManyElement->cache)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    449
                 | 
                                    
                             1                          | 
                
                 | 
                                    $mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($oneToManyElement->cache));  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    450
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    451
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    452
                 | 
                                    
                             7                          | 
                
                 | 
                                $metadata->mapOneToMany($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    453
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    454
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    455
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    456
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <many-to-one ...> mappings  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    457
                 | 
                                    
                             35                          | 
                
                 | 
                        if (isset($xmlRoot->{'many-to-one'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    458
                 | 
                                    
                             5                          | 
                
                 | 
                            foreach ($xmlRoot->{'many-to-one'} as $manyToOneElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    459
                 | 
                                    
                                                     | 
                
                 | 
                                $mapping = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    460
                 | 
                                    
                             5                          | 
                
                 | 
                                    'fieldName' => (string) $manyToOneElement['field'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    461
                 | 
                                    
                             5                          | 
                
                 | 
                                    'targetEntity' => (string) $manyToOneElement['target-entity']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    462
                 | 
                                    
                                                     | 
                
                 | 
                                ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    463
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    464
                 | 
                                    
                             5                          | 
                
                 | 
                                if (isset($associationIds[$mapping['fieldName']])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    465
                 | 
                                    
                             2                          | 
                
                 | 
                                    $mapping['id'] = true;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    466
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    467
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    468
                 | 
                                    
                             5                          | 
                
                 | 
                                if (isset($manyToOneElement['fetch'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    469
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToOneElement['fetch']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    470
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    471
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    472
                 | 
                                    
                             5                          | 
                
                 | 
                                if (isset($manyToOneElement['inversed-by'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    473
                 | 
                                    
                             1                          | 
                
                 | 
                                    $mapping['inversedBy'] = (string) $manyToOneElement['inversed-by'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    474
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    475
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    476
                 | 
                                    
                             5                          | 
                
                 | 
                                $joinColumns = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    477
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    478
                 | 
                                    
                             5                          | 
                
                 | 
                                if (isset($manyToOneElement->{'join-column'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    479
                 | 
                                    
                             4                          | 
                
                 | 
                                    $joinColumns[] = $this->joinColumnToArray($manyToOneElement->{'join-column'}); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    480
                 | 
                                    
                             1                          | 
                
                 | 
                                } else if (isset($manyToOneElement->{'join-columns'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    481
                 | 
                                    
                             1                          | 
                
                 | 
                                    foreach ($manyToOneElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    482
                 | 
                                    
                             1                          | 
                
                 | 
                                        $joinColumns[] = $this->joinColumnToArray($joinColumnElement);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    483
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    484
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    485
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    486
                 | 
                                    
                             5                          | 
                
                 | 
                                $mapping['joinColumns'] = $joinColumns;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    487
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    488
                 | 
                                    
                             5                          | 
                
                 | 
                                if (isset($manyToOneElement->cascade)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    489
                 | 
                                    
                             2                          | 
                
                 | 
                                    $mapping['cascade'] = $this->_getCascadeMappings($manyToOneElement->cascade);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    490
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    491
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    492
                 | 
                                    
                                                     | 
                
                 | 
                                // Evaluate second level cache  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    493
                 | 
                                    
                             5                          | 
                
                 | 
                                if (isset($manyToOneElement->cache)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    494
                 | 
                                    
                             1                          | 
                
                 | 
                                    $mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($manyToOneElement->cache));  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    495
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    496
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    497
                 | 
                                    
                             5                          | 
                
                 | 
                                $metadata->mapManyToOne($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    498
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    499
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    500
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    501
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    502
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <many-to-many ...> mappings  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    503
                 | 
                                    
                             34                          | 
                
                 | 
                        if (isset($xmlRoot->{'many-to-many'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    504
                 | 
                                    
                             10                          | 
                
                 | 
                            foreach ($xmlRoot->{'many-to-many'} as $manyToManyElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    505
                 | 
                                    
                                                     | 
                
                 | 
                                $mapping = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    506
                 | 
                                    
                             10                          | 
                
                 | 
                                    'fieldName' => (string) $manyToManyElement['field'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    507
                 | 
                                    
                             10                          | 
                
                 | 
                                    'targetEntity' => (string) $manyToManyElement['target-entity']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    508
                 | 
                                    
                                                     | 
                
                 | 
                                ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    509
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    510
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($manyToManyElement['fetch'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    511
                 | 
                                    
                             1                          | 
                
                 | 
                                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToManyElement['fetch']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    512
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    513
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    514
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($manyToManyElement['orphan-removal'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    515
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['orphanRemoval'] = $this->evaluateBoolean($manyToManyElement['orphan-removal']);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    516
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    517
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    518
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($manyToManyElement['mapped-by'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    519
                 | 
                                    
                             2                          | 
                
                 | 
                                    $mapping['mappedBy'] = (string) $manyToManyElement['mapped-by'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    520
                 | 
                                    
                             8                          | 
                
                 | 
                                } else if (isset($manyToManyElement->{'join-table'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    521
                 | 
                                    
                             6                          | 
                
                 | 
                                    if (isset($manyToManyElement['inversed-by'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    522
                 | 
                                    
                             2                          | 
                
                 | 
                                        $mapping['inversedBy'] = (string) $manyToManyElement['inversed-by'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    523
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    524
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    525
                 | 
                                    
                             6                          | 
                
                 | 
                                    $joinTableElement = $manyToManyElement->{'join-table'}; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    526
                 | 
                                    
                                                     | 
                
                 | 
                                    $joinTable = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    527
                 | 
                                    
                             6                          | 
                
                 | 
                                        'name' => (string) $joinTableElement['name']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    528
                 | 
                                    
                                                     | 
                
                 | 
                                    ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    529
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    530
                 | 
                                    
                             6                          | 
                
                 | 
                                    if (isset($joinTableElement['schema'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    531
                 | 
                                    
                                                     | 
                
                 | 
                                        $joinTable['schema'] = (string) $joinTableElement['schema'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    532
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    533
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    534
                 | 
                                    
                             6                          | 
                
                 | 
                                    foreach ($joinTableElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    535
                 | 
                                    
                             6                          | 
                
                 | 
                                        $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    536
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    537
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    538
                 | 
                                    
                             6                          | 
                
                 | 
                                    foreach ($joinTableElement->{'inverse-join-columns'}->{'join-column'} as $joinColumnElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    539
                 | 
                                    
                             6                          | 
                
                 | 
                                        $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    540
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    541
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    542
                 | 
                                    
                             6                          | 
                
                 | 
                                    $mapping['joinTable'] = $joinTable;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    543
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    544
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    545
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($manyToManyElement->cascade)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    546
                 | 
                                    
                             6                          | 
                
                 | 
                                    $mapping['cascade'] = $this->_getCascadeMappings($manyToManyElement->cascade);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    547
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    548
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    549
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($manyToManyElement->{'order-by'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    550
                 | 
                                    
                                                     | 
                
                 | 
                                    $orderBy = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    551
                 | 
                                    
                                                     | 
                
                 | 
                                    foreach ($manyToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    552
                 | 
                                    
                                                     | 
                
                 | 
                                        $orderBy[(string) $orderByField['name']] = (string) $orderByField['direction'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    553
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    554
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['orderBy'] = $orderBy;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    555
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    556
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    557
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($manyToManyElement['index-by'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    558
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['indexBy'] = (string) $manyToManyElement['index-by'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    559
                 | 
                                    
                             10                          | 
                
                 | 
                                } else if (isset($manyToManyElement->{'index-by'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    560
                 | 
                                    
                                                     | 
                
                 | 
                                    throw new \InvalidArgumentException("<index-by /> is not a valid tag"); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    561
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    562
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    563
                 | 
                                    
                                                     | 
                
                 | 
                                // Evaluate second level cache  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    564
                 | 
                                    
                             10                          | 
                
                 | 
                                if (isset($manyToManyElement->cache)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    565
                 | 
                                    
                                                     | 
                
                 | 
                                    $mapping['cache'] = $metadata->getAssociationCacheDefaults($mapping['fieldName'], $this->cacheToArray($manyToManyElement->cache));  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    566
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    567
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    568
                 | 
                                    
                             10                          | 
                
                 | 
                                $metadata->mapManyToMany($mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    569
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    570
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    571
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    572
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate association-overrides  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    573
                 | 
                                    
                             34                          | 
                
                 | 
                        if (isset($xmlRoot->{'attribute-overrides'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    574
                 | 
                                    
                             2                          | 
                
                 | 
                            foreach ($xmlRoot->{'attribute-overrides'}->{'attribute-override'} as $overrideElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    575
                 | 
                                    
                             2                          | 
                
                 | 
                                $fieldName = (string) $overrideElement['name'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    576
                 | 
                                    
                             2                          | 
                
                 | 
                                foreach ($overrideElement->field as $field) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    577
                 | 
                                    
                             2                          | 
                
                 | 
                                    $mapping = $this->columnToArray($field);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    578
                 | 
                                    
                             2                          | 
                
                 | 
                                    $mapping['fieldName'] = $fieldName;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    579
                 | 
                                    
                             2                          | 
                
                 | 
                                    $metadata->setAttributeOverride($fieldName, $mapping);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    580
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    581
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    582
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    583
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    584
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate association-overrides  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    585
                 | 
                                    
                             34                          | 
                
                 | 
                        if (isset($xmlRoot->{'association-overrides'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    586
                 | 
                                    
                             4                          | 
                
                 | 
                            foreach ($xmlRoot->{'association-overrides'}->{'association-override'} as $overrideElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    587
                 | 
                                    
                             4                          | 
                
                 | 
                                $fieldName  = (string) $overrideElement['name'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    588
                 | 
                                    
                             4                          | 
                
                 | 
                                $override   = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    589
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    590
                 | 
                                    
                                                     | 
                
                 | 
                                // Check for join-columns  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    591
                 | 
                                    
                             4                          | 
                
                 | 
                                if (isset($overrideElement->{'join-columns'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    592
                 | 
                                    
                             2                          | 
                
                 | 
                                    $joinColumns = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    593
                 | 
                                    
                             2                          | 
                
                 | 
                                    foreach ($overrideElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    594
                 | 
                                    
                             2                          | 
                
                 | 
                                        $joinColumns[] = $this->joinColumnToArray($joinColumnElement);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    595
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    596
                 | 
                                    
                             2                          | 
                
                 | 
                                    $override['joinColumns'] = $joinColumns;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    597
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    598
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    599
                 | 
                                    
                                                     | 
                
                 | 
                                // Check for join-table  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    600
                 | 
                                    
                             4                          | 
                
                 | 
                                if ($overrideElement->{'join-table'}) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    601
                 | 
                                    
                             2                          | 
                
                 | 
                                    $joinTable          = null;  | 
            
                            
                    | 
                        
                     | 
                     | 
                     | 
                    
                                                                                                    
                        
                         
                                                                                        
                                                                                     
                     | 
                
            
                                                                        
                            
            
                                    
            
            
                | 
                    602
                 | 
                                    
                             2                          | 
                
                 | 
                                    $joinTableElement   = $overrideElement->{'join-table'}; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    603
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    604
                 | 
                                    
                                                     | 
                
                 | 
                                    $joinTable = [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    605
                 | 
                                    
                             2                          | 
                
                 | 
                                        'name'      => (string) $joinTableElement['name'],  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    606
                 | 
                                    
                             2                          | 
                
                 | 
                                        'schema'    => (string) $joinTableElement['schema']  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    607
                 | 
                                    
                                                     | 
                
                 | 
                                    ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    608
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    609
                 | 
                                    
                             2                          | 
                
                 | 
                                    if (isset($joinTableElement->{'join-columns'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    610
                 | 
                                    
                             2                          | 
                
                 | 
                                        foreach ($joinTableElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    611
                 | 
                                    
                             2                          | 
                
                 | 
                                            $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    612
                 | 
                                    
                                                     | 
                
                 | 
                                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    613
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    614
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    615
                 | 
                                    
                             2                          | 
                
                 | 
                                    if (isset($joinTableElement->{'inverse-join-columns'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    616
                 | 
                                    
                             2                          | 
                
                 | 
                                        foreach ($joinTableElement->{'inverse-join-columns'}->{'join-column'} as $joinColumnElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    617
                 | 
                                    
                             2                          | 
                
                 | 
                                            $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    618
                 | 
                                    
                                                     | 
                
                 | 
                                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    619
                 | 
                                    
                                                     | 
                
                 | 
                                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    620
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    621
                 | 
                                    
                             2                          | 
                
                 | 
                                    $override['joinTable'] = $joinTable;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    622
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    623
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    624
                 | 
                                    
                                                     | 
                
                 | 
                                // Check for inversed-by  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    625
                 | 
                                    
                             4                          | 
                
                 | 
                                if (isset($overrideElement->{'inversed-by'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    626
                 | 
                                    
                             1                          | 
                
                 | 
                                    $override['inversedBy'] = (string) $overrideElement->{'inversed-by'}['name']; | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    627
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    628
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    629
                 | 
                                    
                                                     | 
                
                 | 
                                // Check for `fetch`  | 
            
                            
                    | 
                        
                     | 
                     | 
                     | 
                    
                                                                                                    
                        
                         
                                                                                        
                                                                                     
                     | 
                
            
                                                                        
                            
            
                                    
            
            
                | 
                    630
                 | 
                                    
                             4                          | 
                
                 | 
                                if (isset($overrideElement['fetch'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    631
                 | 
                                    
                             1                          | 
                
                 | 
                                    $override['fetch'] = constant(Metadata::class . '::FETCH_' . (string) $overrideElement['fetch']);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    632
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    633
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    634
                 | 
                                    
                             4                          | 
                
                 | 
                                $metadata->setAssociationOverride($fieldName, $override);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    635
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    636
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    637
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    638
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate <lifecycle-callbacks...>  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    639
                 | 
                                    
                             34                          | 
                
                 | 
                        if (isset($xmlRoot->{'lifecycle-callbacks'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    640
                 | 
                                    
                             3                          | 
                
                 | 
                            foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    641
                 | 
                                    
                             3                          | 
                
                 | 
                                $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string) $lifecycleCallback['type'])); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    642
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    643
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    644
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    645
                 | 
                                    
                                                     | 
                
                 | 
                        // Evaluate entity listener  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    646
                 | 
                                    
                             34                          | 
                
                 | 
                        if (isset($xmlRoot->{'entity-listeners'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    647
                 | 
                                    
                             4                          | 
                
                 | 
                            foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    648
                 | 
                                    
                             4                          | 
                
                 | 
                                $className = (string) $listenerElement['class'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    649
                 | 
                                    
                                                     | 
                
                 | 
                                // Evaluate the listener using naming convention.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    650
                 | 
                                    
                             4                          | 
                
                 | 
                                if ($listenerElement->count() === 0) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    651
                 | 
                                    
                             2                          | 
                
                 | 
                                    EntityListenerBuilder::bindEntityListener($metadata, $className);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    652
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    653
                 | 
                                    
                             2                          | 
                
                 | 
                                    continue;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    654
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    655
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    656
                 | 
                                    
                             2                          | 
                
                 | 
                                foreach ($listenerElement as $callbackElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    657
                 | 
                                    
                             2                          | 
                
                 | 
                                    $eventName   = (string) $callbackElement['type'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    658
                 | 
                                    
                             2                          | 
                
                 | 
                                    $methodName  = (string) $callbackElement['method'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    659
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    660
                 | 
                                    
                             2                          | 
                
                 | 
                                    $metadata->addEntityListener($eventName, $className, $methodName);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    661
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    662
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    663
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    664
                 | 
                                    
                             34                          | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    665
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    666
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    667
                 | 
                                    
                                                     | 
                
                 | 
                     * Parses (nested) option elements.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    668
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    669
                 | 
                                    
                                                     | 
                
                 | 
                     * @param SimpleXMLElement $options The XML element.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    670
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    671
                 | 
                                    
                                                     | 
                
                 | 
                     * @return array The options array.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    672
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    673
                 | 
                                    
                             4                          | 
                
                 | 
                    private function _parseOptions(SimpleXMLElement $options)  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    674
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    675
                 | 
                                    
                             4                          | 
                
                 | 
                        $array = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    676
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    677
                 | 
                                    
                                                     | 
                
                 | 
                        /* @var $option SimpleXMLElement */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    678
                 | 
                                    
                             4                          | 
                
                 | 
                        foreach ($options as $option) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    679
                 | 
                                    
                             4                          | 
                
                 | 
                            if ($option->count()) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    680
                 | 
                                    
                             3                          | 
                
                 | 
                                $value = $this->_parseOptions($option->children());  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    681
                 | 
                                    
                                                     | 
                
                 | 
                            } else { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    682
                 | 
                                    
                             4                          | 
                
                 | 
                                $value = (string) $option;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    683
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    684
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    685
                 | 
                                    
                             4                          | 
                
                 | 
                            $attributes = $option->attributes();  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    686
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    687
                 | 
                                    
                             4                          | 
                
                 | 
                            if (isset($attributes->name)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    688
                 | 
                                    
                             4                          | 
                
                 | 
                                $nameAttribute = (string) $attributes->name;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    689
                 | 
                                    
                             4                          | 
                
                 | 
                                $array[$nameAttribute] = in_array($nameAttribute, ['unsigned', 'fixed'])  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    690
                 | 
                                    
                             3                          | 
                
                 | 
                                    ? $this->evaluateBoolean($value)  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    691
                 | 
                                    
                             4                          | 
                
                 | 
                                    : $value;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    692
                 | 
                                    
                                                     | 
                
                 | 
                            } else { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    693
                 | 
                                    
                             4                          | 
                
                 | 
                                $array[] = $value;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    694
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    695
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    696
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    697
                 | 
                                    
                             4                          | 
                
                 | 
                        return $array;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    698
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    699
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    700
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    701
                 | 
                                    
                                                     | 
                
                 | 
                     * Constructs a joinColumn mapping array based on the information  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    702
                 | 
                                    
                                                     | 
                
                 | 
                     * found in the given SimpleXMLElement.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    703
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    704
                 | 
                                    
                                                     | 
                
                 | 
                     * @param SimpleXMLElement $joinColumnElement The XML element.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    705
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    706
                 | 
                                    
                                                     | 
                
                 | 
                     * @return array The mapping array.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    707
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    708
                 | 
                                    
                             11                          | 
                
                 | 
                    private function joinColumnToArray(SimpleXMLElement $joinColumnElement)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    709
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    710
                 | 
                                    
                                                     | 
                
                 | 
                        $joinColumn = [  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    711
                 | 
                                    
                             11                          | 
                
                 | 
                            'name' => (string) $joinColumnElement['name'],  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    712
                 | 
                                    
                             11                          | 
                
                 | 
                            'referencedColumnName' => (string) $joinColumnElement['referenced-column-name']  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    713
                 | 
                                    
                                                     | 
                
                 | 
                        ];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    714
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    715
                 | 
                                    
                             11                          | 
                
                 | 
                        if (isset($joinColumnElement['unique'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    716
                 | 
                                    
                             3                          | 
                
                 | 
                            $joinColumn['unique'] = $this->evaluateBoolean($joinColumnElement['unique']);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    717
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    718
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    719
                 | 
                                    
                             11                          | 
                
                 | 
                        if (isset($joinColumnElement['nullable'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    720
                 | 
                                    
                             5                          | 
                
                 | 
                            $joinColumn['nullable'] = $this->evaluateBoolean($joinColumnElement['nullable']);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    721
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    722
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    723
                 | 
                                    
                             11                          | 
                
                 | 
                        if (isset($joinColumnElement['on-delete'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    724
                 | 
                                    
                             3                          | 
                
                 | 
                            $joinColumn['onDelete'] = (string) $joinColumnElement['on-delete'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    725
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    726
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    727
                 | 
                                    
                             11                          | 
                
                 | 
                        if (isset($joinColumnElement['column-definition'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    728
                 | 
                                    
                             3                          | 
                
                 | 
                            $joinColumn['columnDefinition'] = (string) $joinColumnElement['column-definition'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    729
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    730
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    731
                 | 
                                    
                             11                          | 
                
                 | 
                        return $joinColumn;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    732
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    733
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    734
                 | 
                                    
                                                     | 
                
                 | 
                     /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    735
                 | 
                                    
                                                     | 
                
                 | 
                     * Parses the given field as array.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    736
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    737
                 | 
                                    
                                                     | 
                
                 | 
                     * @param SimpleXMLElement $fieldMapping  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    738
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    739
                 | 
                                    
                                                     | 
                
                 | 
                     * @return array  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    740
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    741
                 | 
                                    
                             22                          | 
                
                 | 
                    private function columnToArray(SimpleXMLElement $fieldMapping)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    742
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    743
                 | 
                                    
                                                     | 
                
                 | 
                        $mapping = [  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    744
                 | 
                                    
                             22                          | 
                
                 | 
                            'fieldName' => (string) $fieldMapping['name'],  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    745
                 | 
                                    
                                                     | 
                
                 | 
                        ];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    746
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    747
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['type'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    748
                 | 
                                    
                             18                          | 
                
                 | 
                            $mapping['type'] = (string) $fieldMapping['type'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    749
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    750
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    751
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['column'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    752
                 | 
                                    
                             14                          | 
                
                 | 
                            $mapping['columnName'] = (string) $fieldMapping['column'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    753
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    754
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    755
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['length'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    756
                 | 
                                    
                             9                          | 
                
                 | 
                            $mapping['length'] = (int) $fieldMapping['length'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    757
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    758
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    759
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['precision'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    760
                 | 
                                    
                             1                          | 
                
                 | 
                            $mapping['precision'] = (int) $fieldMapping['precision'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    761
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    762
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    763
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['scale'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    764
                 | 
                                    
                             1                          | 
                
                 | 
                            $mapping['scale'] = (int) $fieldMapping['scale'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    765
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    766
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    767
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['unique'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    768
                 | 
                                    
                             8                          | 
                
                 | 
                            $mapping['unique'] = $this->evaluateBoolean($fieldMapping['unique']);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    769
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    770
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    771
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['nullable'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    772
                 | 
                                    
                             7                          | 
                
                 | 
                            $mapping['nullable'] = $this->evaluateBoolean($fieldMapping['nullable']);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    773
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    774
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    775
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['version']) && $fieldMapping['version']) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    776
                 | 
                                    
                             3                          | 
                
                 | 
                            $mapping['version'] = $this->evaluateBoolean($fieldMapping['version']);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    777
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    778
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    779
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping['column-definition'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    780
                 | 
                                    
                             4                          | 
                
                 | 
                            $mapping['columnDefinition'] = (string) $fieldMapping['column-definition'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    781
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    782
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    783
                 | 
                                    
                             22                          | 
                
                 | 
                        if (isset($fieldMapping->options)) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    784
                 | 
                                    
                             3                          | 
                
                 | 
                            $mapping['options'] = $this->_parseOptions($fieldMapping->options->children());  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    785
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    786
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    787
                 | 
                                    
                             22                          | 
                
                 | 
                        return $mapping;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    788
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    789
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    790
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    791
                 | 
                                    
                                                     | 
                
                 | 
                     * Parse / Normalize the cache configuration  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    792
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    793
                 | 
                                    
                                                     | 
                
                 | 
                     * @param SimpleXMLElement $cacheMapping  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    794
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    795
                 | 
                                    
                                                     | 
                
                 | 
                     * @return array  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    796
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    797
                 | 
                                    
                             2                          | 
                
                 | 
                    private function cacheToArray(SimpleXMLElement $cacheMapping)  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    798
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    799
                 | 
                                    
                             2                          | 
                
                 | 
                        $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    800
                 | 
                                    
                             2                          | 
                
                 | 
                        $usage  = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    801
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    802
                 | 
                                    
                             2                          | 
                
                 | 
                        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    803
                 | 
                                    
                                                     | 
                
                 | 
                            throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    804
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    805
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    806
                 | 
                                    
                             2                          | 
                
                 | 
                        if ($usage) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    807
                 | 
                                    
                             2                          | 
                
                 | 
                            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    808
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    809
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    810
                 | 
                                    
                                                     | 
                
                 | 
                        return [  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    811
                 | 
                                    
                             2                          | 
                
                 | 
                            'usage'  => $usage,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    812
                 | 
                                    
                             2                          | 
                
                 | 
                            'region' => $region,  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    813
                 | 
                                    
                                                     | 
                
                 | 
                        ];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    814
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    815
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    816
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    817
                 | 
                                    
                                                     | 
                
                 | 
                     * Gathers a list of cascade options found in the given cascade element.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    818
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    819
                 | 
                                    
                                                     | 
                
                 | 
                     * @param SimpleXMLElement $cascadeElement The cascade element.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    820
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    821
                 | 
                                    
                                                     | 
                
                 | 
                     * @return array The list of cascade options.  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    822
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    823
                 | 
                                    
                             6                          | 
                
                 | 
                    private function _getCascadeMappings(SimpleXMLElement $cascadeElement)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    824
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    825
                 | 
                                    
                             6                          | 
                
                 | 
                        $cascades = [];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    826
                 | 
                                    
                                                     | 
                
                 | 
                        /* @var $action SimpleXmlElement */  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    827
                 | 
                                    
                             6                          | 
                
                 | 
                        foreach ($cascadeElement->children() as $action) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    828
                 | 
                                    
                                                     | 
                
                 | 
                            // According to the JPA specifications, XML uses "cascade-persist"  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    829
                 | 
                                    
                                                     | 
                
                 | 
                            // instead of "persist". Here, both variations  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    830
                 | 
                                    
                                                     | 
                
                 | 
                            // are supported because both YAML and Annotation use "persist"  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    831
                 | 
                                    
                                                     | 
                
                 | 
                            // and we want to make sure that this driver doesn't need to know  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    832
                 | 
                                    
                                                     | 
                
                 | 
                            // anything about the supported cascading actions  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    833
                 | 
                                    
                             6                          | 
                
                 | 
                            $cascades[] = str_replace('cascade-', '', $action->getName()); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    834
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    835
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    836
                 | 
                                    
                             6                          | 
                
                 | 
                        return $cascades;  | 
            
            
                                                                        
                                                                
            
                                    
            
            
                | 
                    837
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                        
                                                                
            
                                    
            
            
                | 
                    838
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    839
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    840
                 | 
                                    
                                                     | 
                
                 | 
                     * {@inheritDoc} | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    841
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    842
                 | 
                                    
                             38                          | 
                
                 | 
                    protected function loadMappingFile($file)  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    843
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    844
                 | 
                                    
                             38                          | 
                
                 | 
                        $this->validateMapping($file);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    845
                 | 
                                    
                             36                          | 
                
                 | 
                        $result = [];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    846
                 | 
                                    
                                                     | 
                
                 | 
                        // Note: we do not use `simplexml_load_file()` because of https://bugs.php.net/bug.php?id=62577  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    847
                 | 
                                    
                             36                          | 
                
                 | 
                        $xmlElement = simplexml_load_string(file_get_contents($file));  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    848
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    849
                 | 
                                    
                             36                          | 
                
                 | 
                        if (isset($xmlElement->entity)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    850
                 | 
                                    
                             35                          | 
                
                 | 
                            foreach ($xmlElement->entity as $entityElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    851
                 | 
                                    
                             35                          | 
                
                 | 
                                $entityName = (string) $entityElement['name'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    852
                 | 
                                    
                             35                          | 
                
                 | 
                                $result[$entityName] = $entityElement;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    853
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    854
                 | 
                                    
                             8                          | 
                
                 | 
                        } else if (isset($xmlElement->{'mapped-superclass'})) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    855
                 | 
                                    
                             5                          | 
                
                 | 
                            foreach ($xmlElement->{'mapped-superclass'} as $mappedSuperClass) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    856
                 | 
                                    
                             5                          | 
                
                 | 
                                $className = (string) $mappedSuperClass['name'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    857
                 | 
                                    
                             5                          | 
                
                 | 
                                $result[$className] = $mappedSuperClass;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    858
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    859
                 | 
                                    
                             3                          | 
                
                 | 
                        } else if (isset($xmlElement->embeddable)) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    860
                 | 
                                    
                             3                          | 
                
                 | 
                            foreach ($xmlElement->embeddable as $embeddableElement) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    861
                 | 
                                    
                             3                          | 
                
                 | 
                                $embeddableName = (string) $embeddableElement['name'];  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    862
                 | 
                                    
                             3                          | 
                
                 | 
                                $result[$embeddableName] = $embeddableElement;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    863
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    864
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    865
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    866
                 | 
                                    
                             36                          | 
                
                 | 
                        return $result;  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    867
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    868
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    869
                 | 
                                    
                             38                          | 
                
                 | 
                    private function validateMapping(string $file): void  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    870
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    871
                 | 
                                    
                             38                          | 
                
                 | 
                        $backedUpErrorSetting = libxml_use_internal_errors(true);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    872
                 | 
                                    
                             38                          | 
                
                 | 
                        $document = new \DOMDocument();  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    873
                 | 
                                    
                             38                          | 
                
                 | 
                        $document->load($file);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    874
                 | 
                                    
                                                     | 
                
                 | 
                        try { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    875
                 | 
                                    
                             38                          | 
                
                 | 
                            if ( ! $document->schemaValidate(__DIR__ . '/../../../../../doctrine-mapping.xsd')) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    876
                 | 
                                    
                             2                          | 
                
                 | 
                                $errors = libxml_get_errors();  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    877
                 | 
                                    
                             2                          | 
                
                 | 
                                throw MappingException::fromLibXmlErrors($errors);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    878
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    879
                 | 
                                    
                             36                          | 
                
                 | 
                        } finally { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    880
                 | 
                                    
                             38                          | 
                
                 | 
                            libxml_clear_errors();  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    881
                 | 
                                    
                             38                          | 
                
                 | 
                            libxml_use_internal_errors($backedUpErrorSetting);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    882
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    883
                 | 
                                    
                             36                          | 
                
                 | 
                    }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    884
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    885
                 | 
                                    
                                                     | 
                
                 | 
                    /**  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    886
                 | 
                                    
                                                     | 
                
                 | 
                     * @param mixed $element  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    887
                 | 
                                    
                                                     | 
                
                 | 
                     *  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    888
                 | 
                                    
                                                     | 
                
                 | 
                     * @return bool  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    889
                 | 
                                    
                                                     | 
                
                 | 
                     */  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    890
                 | 
                                    
                             12                          | 
                
                 | 
                    protected function evaluateBoolean($element)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    891
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    892
                 | 
                                    
                             12                          | 
                
                 | 
                        $flag = (string) $element;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    893
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    894
                 | 
                                    
                             12                          | 
                
                 | 
                        return ($flag == "true" || $flag == "1");  | 
            
            
                                                                        
                                                                
            
                                    
            
            
                | 
                    895
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                        
                                                                
            
                                    
            
            
                | 
                    896
                 | 
                                    
                                                     | 
                
                 | 
                }  | 
            
            
                                                                        
                                                                
            
                                    
            
            
                | 
                    897
                 | 
                                    
                                                     | 
                
                 | 
                 |