18 lines
328 B
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);
|
|
}
|
|
}
|