/**
  * Returns the Table with the given name.
  *
  * @param $name string  the title of the table to retrieve
  * @return Table  the Table object
  */
 private function loadTable($name)
 {
     $tableLoader = new TableLoader();
     $tables = $tableLoader->load('./db/data.txt');
     if (!isset($tables[$name])) {
         throw new Exception('Unknown table: ' . $name . ' (1267601568)');
     }
     return $tables[$name];
 }
Beispiel #2
0
 /**
  * @param FileLocatorInterface         $locator
  * @param LexerConfig|null             $lexerConfig
  * @param LoadingHandlerInterface|null $loadingHandler
  * @param LoaderCacheInterface|null    $loaderCacheInterface
  */
 public function __construct(FileLocatorInterface $locator, LexerConfig $lexerConfig = null, LoadingHandlerInterface $loadingHandler = null, LoaderCacheInterface $loaderCacheInterface = null)
 {
     parent::__construct($locator, $loadingHandler, $loaderCacheInterface);
     $this->lexerConfig = $lexerConfig;
 }
 public function parse($data)
 {
     return parent::parse($data);
 }