nur-sery/nur_src/mapper/base/oobd/OobdManager.php

21 lines
504 B
PHP
Raw Normal View History

2024-04-04 16:26:22 +04:00
<?php
namespace nur\mapper\base\oobd;
use nur\str;
class OobdManager implements IOobdManager {
use TOobdManager;
function getKeyPrefixValues(?string $keyPrefix=null): ?array {
if ($keyPrefix === null) return $this->oobdValues;
$values = null;
foreach ($this->oobdValues as $key => $value) {
if (is_string($key) && str::_starts_with($keyPrefix, $key)) {
$key = str::without_prefix($keyPrefix, $key);
$values[$key] = $value;
}
}
return $values;
}
}