type = new TelephoneType(); } /** @var TelephoneType */ protected $type; function php2ldap($value): ?string { $value = parent::php2ldap($value); if ($value === null) return null; $type = $this->type; return $type->ensureInternational($type->with($value)); } function ldap2php(string $value): string { return $this->type->ensureLocal($value); } }