LdapTools\Object\LdapObject::attributeHasValue PHP Method

attributeHasValue() protected method

Check if an attribute has a specific value. Called only when the attribute is known to exist already.
protected attributeHasValue ( string $attribute, mixed $value ) : boolean
$attribute string
$value mixed
return boolean
    protected function attributeHasValue($attribute, $value)
    {
        $attribute = $this->resolveAttributeName($attribute);
        if (is_array($this->attributes[$attribute])) {
            return in_array($value, $this->attributes[$attribute]);
        } else {
            return $this->attributes[$attribute] == $value;
        }
    }