mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 21:28:02 +02:00
sorting [WIP]
This commit is contained in:
@@ -532,6 +532,7 @@ class Connection implements IConnection
|
|||||||
public function addObjectTranslator(string $class, callable $translator): self
|
public function addObjectTranslator(string $class, callable $translator): self
|
||||||
{
|
{
|
||||||
$this->translators[$class] = $translator;
|
$this->translators[$class] = $translator;
|
||||||
|
uksort($this->translators, fn($a, $b) => class_exists($a, false) && is_subclass_of($a, $b) ? -1 : 1);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user