private function parseDescription($filename, $entityClass)
    {
        $parser = new XmlParser();

        $parser->open($filename);

        /** @var EntityStructure $definition */
        $definition = $parser->parse([
            'onBeforeEntity'   => [$this, 'prepareEntity'],
            'onAfterEntity'    => [$this, 'handleEntity'],
            'onAfterField'     => [$this, 'handleField'],
            'onBeforeOption'   => [$this, 'prepareOption'],
            'onAfterOption'    => [$this, 'handleOption'],
            'onBeforeFieldset' => [$this, 'prepareFieldset'],
            'onAfterFieldset'  => [$this, 'handleFieldset'],
        ], $this->locator);

        return $definition;
    }
private function parseDescription($filename, $entityClass)
    {
        $parser = new XmlParser();

        $parser->open($filename);

        /** @var EntityStructure $definition */
        $definition = $parser->parse([
            'onBeforeEntity'   => [$this, 'prepareEntity'],
            'onAfterEntity'    => [$this, 'handleEntity'],
            'onAfterField'     => [$this, 'handleField'],
            'onBeforeOption'   => [$this, 'prepareOption'],
            'onAfterOption'    => [$this, 'handleOption'],
            'onBeforeFieldset' => [$this, 'prepareFieldset'],
            'onAfterFieldset'  => [$this, 'handleFieldset'],
        ], $this->locator);

        return $definition;
    }
private function parseDescription ( $ filename , $ entityClass ) { $ parser = new XmlParser ( ) ; $ parser -> open ( $ filename ) ; /** @var EntityStructure $definition */ $ definition = $ parser -> parse ( [ 'onBeforeEntity' => [ $ this , 'prepareEntity' ] , 'onAfterEntity' => [ $ this , 'handleEntity' ] , 'onAfterField' => [ $ this , 'handleField' ] , 'onBeforeOption' => [ $ this , 'prepareOption' ] , 'onAfterOption' => [ $ this , 'handleOption' ] , 'onBeforeFieldset' => [ $ this , 'prepareFieldset' ] , 'onAfterFieldset' => [ $ this , 'handleFieldset' ] , ] , $ this -> locator ) ; return $ definition ; }
Parse the description file

@param   string $filename    The definition file path
@param   string $entityClass The class of the entity

@return  EntityStructure  The parsed description
Parse the description file