Except new class MDNodaLink for parameter in NodaIDGetter

This commit is contained in:
Joshua Ramon Enslin 2023-04-16 02:08:14 +02:00
parent d63f811367
commit 838a991256
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -136,15 +136,17 @@ final class NodaIDGetter {
/**
* Returns place ID by entry in place noda table.
*
* @param MDMysqli $mysqli_noda Database connection.
* @param string $noda_source Language to check in.
* @param string $noda_nrinsource Name of the place to search for.
* @param MDMysqli $mysqli_noda Database connection.
* @param MDNodaLink $noda_link Language to check in.
*
* @return integer
*/
public static function getPersinstIDByNodaLink(MDMysqli $mysqli_noda, string $noda_source, string $noda_nrinsource):int {
public static function getPersinstIDByNodaLink(MDMysqli $mysqli_noda, MDNodaLink $noda_link):int {
if (empty($noda_nrinsource)) return 0;
if (empty($noda_link->id)) return 0;
$noda_source = $noda_link->source->toDbName();
$noda_nrinsource = $noda_link->id;
$result = $mysqli_noda->query_by_stmt("
SELECT `persinst_id`
@ -323,15 +325,17 @@ final class NodaIDGetter {
/**
* Returns place ID by entry in place noda table.
*
* @param MDMysqli $mysqli_noda Database connection.
* @param string $noda_source Language to check in.
* @param string $noda_nrinsource Name of the place to search for.
* @param MDMysqli $mysqli_noda Database connection.
* @param MDNodaLink $noda_link Language to check in.
*
* @return integer
*/
public static function getPlaceIDByNodaLink(MDMysqli $mysqli_noda, string $noda_source, string $noda_nrinsource):int {
public static function getPlaceIDByNodaLink(MDMysqli $mysqli_noda, MDNodaLink $noda_link):int {
if (empty($noda_nrinsource)) return 0;
if (empty($noda_link->id)) return 0;
$noda_source = $noda_link->source->toDbName();
$noda_nrinsource = $noda_link->id;
$placeByNodaResult = $mysqli_noda->query_by_stmt("
SELECT `ort_id`
@ -507,15 +511,17 @@ final class NodaIDGetter {
/**
* Returns tag ID by entry in tag noda table.
*
* @param MDMysqli $mysqli_noda Database connection.
* @param string $noda_source Language to check in.
* @param string $noda_nrinsource Name of the tag to search for.
* @param MDMysqli $mysqli_noda Database connection.
* @param MDNodaLink $noda_link Language to check in.
*
* @return integer
*/
public static function getTagIDByNodaLink(MDMysqli $mysqli_noda, string $noda_source, string $noda_nrinsource):int {
public static function getTagIDByNodaLink(MDMysqli $mysqli_noda, MDNodaLink $noda_link):int {
if (empty($noda_nrinsource)) return 0;
if (empty($noda_link->id)) return 0;
$noda_source = $noda_link->source->toDbName();
$noda_nrinsource = $noda_link->id;
$tagByNodaResult = $mysqli_noda->query_by_stmt("
SELECT `tag_id`