LdapTools\Query\LdapQuery::getSingleScalarOrNullResult PHP Method

getSingleScalarOrNullResult() public method

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