private function setupFX_Impl($layoutName, $recordCount, $user, $password) { $fx = new FX($this->dbSettings->getDbSpecServer(), $this->dbSettings->getDbSpecPort(), $this->dbSettings->getDbSpecDataType(), $this->dbSettings->getDbSpecProtocol()); $fx->setCharacterEncoding('UTF-8'); $fx->setDBUserPass($user, $password); $fx->setDBData($this->dbSettings->getDbSpecDatabase(), $layoutName, $recordCount); return $fx; }
private function setupFX_Impl($layoutName, $recordCount, $user, $password) { $fxPath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'FX'; $fxFiles = array('FX.php', 'datasource_classes' . DIRECTORY_SEPARATOR . 'RetrieveFM7Data.class.php'); foreach ($fxFiles as $fxFile) { $path = $fxPath . DIRECTORY_SEPARATOR . $fxFile; if (is_file($path) && is_readable($path)) { require_once $path; } else { // If FX.php isn't installed in valid directories, it shows error message and finishes. throw new Exception('Data Access Class "FileMaker_FX" of INTER-Mediator requires ' . basename($fxFile) . ' on any right directory.'); } } $fxObj = new FX($this->dbSettings->getDbSpecServer(), $this->dbSettings->getDbSpecPort(), $this->dbSettings->getDbSpecDataType(), $this->dbSettings->getDbSpecProtocol()); $fxObj->setCharacterEncoding('UTF-8'); $fxObj->setDBUserPass($user, $password); $fxObj->setDBData($this->dbSettings->getDbSpecDatabase(), $layoutName, $recordCount); return $fxObj; }