21 lines
504 B
PHP
21 lines
504 B
PHP
|
<?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;
|
||
|
}
|
||
|
}
|