/** * Fills table by data from config * * TODO: уйдет из этого класса, пока не известно, куда, но здесь этого кода быть не должно * * @param ContainerInterface $serviceLocator * @throws DataStoreException */ protected function fillTable(ContainerInterface $container, DataStoreAbstract $dataStore) { $config = $container->get('config'); // If configs for tasks doesn't exist do nothing if (!isset($config[self::KEY_TASKS])) { return; } $id = $dataStore->getIdentifier(); foreach ($config[self::KEY_TASKS] as $task) { if (!isset($task[$id])) { throw new DataStoreException("Expected necessary parameter \"{$id}\" in data of filter"); } $dataStore->create($task); } }