protected function checkEntitlement($entitlement_value)
    {
        if ($entitlement_value == 'permitAll') {
            return true;
        }
        if ($entitlement_value == 'denyAll') {
            return false;
        }

        // The user has more than one EduPersonEntitlement.
        if (is_array($this->entitlements)) {
            return (in_array($entitlement_value, $this->entitlements));
            // User only has one EduPersonEntitlement.
        } else {
            return ($entitlement_value == $this->entitlements);
        }
    }
protected function checkEntitlement($entitlement_value)
    {
        if ($entitlement_value == 'permitAll') {
            return true;
        }
        if ($entitlement_value == 'denyAll') {
            return false;
        }

        // The user has more than one EduPersonEntitlement.
        if (is_array($this->entitlements)) {
            return (in_array($entitlement_value, $this->entitlements));
            // User only has one EduPersonEntitlement.
        } else {
            return ($entitlement_value == $this->entitlements);
        }
    }
protected function checkEntitlement ( $ entitlement_value ) { if ( $ entitlement_value == 'permitAll' ) { return true ; } if ( $ entitlement_value == 'denyAll' ) { return false ; } // The user has more than one EduPersonEntitlement. if ( is_array ( $ this -> entitlements ) ) { return ( in_array ( $ entitlement_value , $ this -> entitlements ) ) ; // User only has one EduPersonEntitlement. } else { return ( $ entitlement_value == $ this -> entitlements ) ; } }
Searches for a given entitlement in the list of entitlements belonging to the user.

@param string $entitlement_value

@return bool
Searches for a given entitlement in the list of entitlements belonging to the user .