src/LdapTools/Object/LdapObject.php
protected function resolveAttributeName($attribute)
    {
        $result = preg_grep("/^$attribute$/i", array_keys($this->attributes));
        if (empty($result)) {
            throw new InvalidArgumentException(sprintf('Unable to resolve attribute "%s".', $attribute));
        }

        return reset($result);
    }
protected function resolveAttributeName($attribute)
    {
        $result = preg_grep("/^$attribute$/i", array_keys($this->attributes));
        if (empty($result)) {
            throw new InvalidArgumentException(sprintf('Unable to resolve attribute "%s".', $attribute));
        }

        return reset($result);
    }
protected function resolveAttributeName ( $ attribute ) { $ result = preg_grep ( "/^$attribute$/i" , array_keys ( $ this -> attributes ) ) ; if ( empty ( $ result ) ) { throw new InvalidArgumentException ( sprintf ( 'Unable to resolve attribute "%s".' , $ attribute ) ) ; } return reset ( $ result ) ; }
Retrieve the attribute in the case it exists in the array.

@param string $attribute
@return string
Retrieve the attribute in the case it exists in the array .