public function getLinePartnerAndEntry($line, $partnerID, $entryID = null) { $partnerID = -1; $entryID = -1; $xSnameIndex = 26; $fmsFields = explode("\t", $line); if (count($fmsFields) > $xSnameIndex) { preg_match('/^\\/?p\\/([0-9]+)\\/(.*)/', $fmsFields[$xSnameIndex], $matches); if (count($matches) > 2) { $partnerID = $matches[1]; preg_match('/.*\\/(flavorId|entry_id)\\/([01]_,?[^\\.,\\/]+)?(.*\\/)?([01]_,?[^\\.,\\/]+).*/', $matches[2], $objectsMatches); if (count($objectsMatches) > 4) { $objectType = $objectsMatches[1]; $objectID = $objectsMatches[2] ? $objectsMatches[2] : $objectsMatches[4]; $objectID = substr($objectID, 2, 1) == ',' ? substr($objectID, 0, 2) + substr($objectID, 3) : $objectID; if ($objectType == "flavorId") { $entryIDResult = DWHInspector::getEntryIDByFlavorID($objectID); if ($entryIDResult != null) { $entryID = $entryIDResult; } } else { $entryID = $objectID; } return true; } } } return false; }