public function exists($attribute, $value = null)
        {
            $attribute = strval($attribute);

            if(\Thin\Arrays::exists($attribute, $this->attributes)) {
                if(null === $value || in_array(strval($value), $this->attributes[$attribute])) {
                    return true;
                }
            }

            return false;
        }
public function exists($attribute, $value = null)
        {
            $attribute = strval($attribute);

            if(\Thin\Arrays::exists($attribute, $this->attributes)) {
                if(null === $value || in_array(strval($value), $this->attributes[$attribute])) {
                    return true;
                }
            }

            return false;
        }
public function exists ( $ attribute , $ value = null ) { $ attribute = strval ( $ attribute ) ; if ( \ Thin \ Arrays :: exists ( $ attribute , $ this -> attributes ) ) { if ( null === $ value || in_array ( strval ( $ value ) , $ this -> attributes [ $ attribute ] ) ) { return true ; } } return false ; }
Check whether a given attribute or attribute value exists

@param string $attribute Attribute name whose existence is to be checked
@param string $value The attribute's value to be checked. Omit the parametre to check the existence of the attribute.

@return boolean
Check whether a given attribute or attribute value exists