nur-sery/nur_src/ldap/syntaxes/IntegerSyntax.php

18 lines
328 B
PHP

<?php
namespace nur\ldap\syntaxes;
class IntegerSyntax extends AbstractSyntax {
function getPhpType(): ?string {
return "int";
}
function php2ldap($value): ?string {
if ($value === null) return null;
else return strval($value);
}
function ldap2php(string $value): int {
return intval($value);
}
}