LdapTools\Query\LdapQuery::getSingleScalarOrNullResult PHP Méthode

getSingleScalarOrNullResult() public méthode

This behaves very similar to getSingleScalarResult(), only if the attribute is not found it will return null instead of throwing an exception.
public getSingleScalarOrNullResult ( ) : mixed
Résultat mixed
    public function getSingleScalarOrNullResult()
    {
        try {
            return $this->getSingleScalarResult();
        } catch (AttributeNotFoundException $e) {
            return null;
        }
    }