Exemplo n.º 1
0
 /**
  * @param $modulePath
  * @return \TheliaStudio\Parser\Entity\Table[]
  */
 protected function buildEntities($modulePath, $whiteList)
 {
     $entities = array();
     $schemaFile = $modulePath . "Config" . DS . "schema.xml";
     if (is_file($schemaFile) && is_readable($schemaFile)) {
         $xml = new SimpleXMLElement(file_get_contents($schemaFile));
         $parser = new SchemaParser();
         $entities = $parser->parseXml($xml, $whiteList);
     }
     return $entities;
 }
Exemplo n.º 2
0
 protected function buildEvent()
 {
     $parser = new SchemaParser();
     $entities = $parser->parseXml(new SimpleXMLElement(file_get_contents(__DIR__ . DS . str_replace("/", DS, static::TEST_MODULE_PATH) . "Config" . DS . "schema.xml")));
     $this->event->setKernel($this->kernel)->setModulePath($this->getStreamPath(''))->setEntities($entities)->setResourcesPath(realpath(__DIR__ . DS . ".." . DS . "Resources") . DS);
 }