public function setUp() { $data = file_get_contents(__DIR__ . '/example-metadata'); //$params = array('url' => 'mysql://*****:*****@localhost:33060/drapo'); //$connection = \Doctrine\DBAL\DriverManager::getConnection($params); //$config = Setup::createConfiguration(); // * $paths = array('/path/to/entity/mapping/files'); // * $config = Setup::createAnnotationMetadataConfiguration($paths); //$entityManager = EntityManager::create($connection, $config); $this->da = new DoctrineAnalyzer(); //$this->da->setEntityManager($entityManager); $this->da->setMetadata(unserialize($data)); $this->collections = $this->da->analyze(); $this->map = new Apimap($this->collections); }
public function __construct() { $data = file_get_contents(__DIR__ . '/example-metadata'); $this->da = new DoctrineAnalyzer(); $this->da->setMetadata(unserialize($data)); }