mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
DbObject: new method getKeyParams()
This commit is contained in:
parent
12f62fe30c
commit
7f9d1750c5
@ -426,6 +426,21 @@ abstract class DbObject
|
|||||||
return $this->autoincKeyName;
|
return $this->autoincKeyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getKeyParams()
|
||||||
|
{
|
||||||
|
$params = array();;
|
||||||
|
$key = $this->getKeyName();
|
||||||
|
if (is_array($key)) {
|
||||||
|
foreach ($key as $k) {
|
||||||
|
$params[$k] = $this->get($k);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$params[$key] = $this->get($this->keyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $params;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the unique identifier
|
* Return the unique identifier
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user