예제 #1
0
파일: data.php 프로젝트: solire/trieur
 public static function run()
 {
     $configPath = 'config/client.yml';
     $array = Yaml::parse($configPath);
     $conf = Loader::load($array);
     $trieur = new Trieur($conf, 'data/clients.csv');
     $trieur->setRequest($_POST);
     $response = $trieur->getResponse();
     return $response;
 }
예제 #2
0
파일: data.php 프로젝트: solire/trieur
 public static function run()
 {
     $configPath = 'config/client.yml';
     $array = Yaml::parse($configPath);
     $conf = Loader::load($array);
     $configDbPath = 'config/connection.ini';
     $configDb = parse_ini_file($configDbPath);
     $configDb['driverOptions'] = [PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'];
     $doctrineConnection = DriverManager::getConnection($configDb);
     $trieur = new Trieur($conf, $doctrineConnection);
     $trieur->setRequest($_POST);
     $response = $trieur->getResponse();
     $response['debug'] = $trieur->getSource()->getDataQuery()->getSQL();
     return $response;
 }