main/migration/Generator/Generator.php
public function getSchemas()
    {
        if (count($this->schemas) === 0) {
            $this->schemas['metadata'] = $this->em->getMetadataFactory()->getAllMetadata();
            $this->schemas['fromSchema'] = $this->em->getConnection()->getSchemaManager()->createSchema();
            $this->schemas['toSchema'] = $this->schemaTool->getSchemaFromMetadata($this->schemas['metadata']);
        }

        // cloning schemas is much more ligther than re-generating them for each platform
        return array(
            'fromSchema' => clone $this->schemas['fromSchema'],
            'toSchema' => clone $this->schemas['toSchema'],
            'metadata' => $this->schemas['metadata'],
        );
    }
public function getSchemas()
    {
        if (count($this->schemas) === 0) {
            $this->schemas['metadata'] = $this->em->getMetadataFactory()->getAllMetadata();
            $this->schemas['fromSchema'] = $this->em->getConnection()->getSchemaManager()->createSchema();
            $this->schemas['toSchema'] = $this->schemaTool->getSchemaFromMetadata($this->schemas['metadata']);
        }

        // cloning schemas is much more ligther than re-generating them for each platform
        return array(
            'fromSchema' => clone $this->schemas['fromSchema'],
            'toSchema' => clone $this->schemas['toSchema'],
            'metadata' => $this->schemas['metadata'],
        );
    }
public function getSchemas ( ) { if ( count ( $ this -> schemas ) === 0 ) { $ this -> schemas [ 'metadata' ] = $ this -> em -> getMetadataFactory ( ) -> getAllMetadata ( ) ; $ this -> schemas [ 'fromSchema' ] = $ this -> em -> getConnection ( ) -> getSchemaManager ( ) -> createSchema ( ) ; $ this -> schemas [ 'toSchema' ] = $ this -> schemaTool -> getSchemaFromMetadata ( $ this -> schemas [ 'metadata' ] ) ; } // cloning schemas is much more ligther than re-generating them for each platform return array ( 'fromSchema' => clone $ this -> schemas [ 'fromSchema' ] , 'toSchema' => clone $ this -> schemas [ 'toSchema' ] , 'metadata' => $ this -> schemas [ 'metadata' ] , ) ; }
Returns the "from" an "to" schemas and the metadata used to generate them.

Note: this method is public for testing purposes only

@return array
Returns the from an to schemas and the metadata used to generate them .