public function transferAction() { $fc = FrontController::getInstance(); $file = new FilesModel(); $params = $fc->getParams(); if (preg_match("/^[a-zA-Z0-9_]+(_[\\d]+s|).txt\$/", $params['filename'])) { $file->getDataFromFile($params['filename']); $file->connectToDb(); $file->putDataToDatabase(); $file->getStatus(); } }