public function canUse($feature)
    {
        // Get features and usage
        $feature_value = $this->value($feature);

        if (is_null($feature_value)) {
            return false;
        }

        // Match "booleans" type value
        if ($this->enabled($feature) === true) {
            return true;
        }

        // If the feature value is zero, let's return false
        // since there's no uses available. (useful to disable
        // countable features)
        if ($feature_value === '0') {
            return false;
        }

        // Check for available uses
        return $this->remainings($feature) > 0;
    }
public function canUse($feature)
    {
        // Get features and usage
        $feature_value = $this->value($feature);

        if (is_null($feature_value)) {
            return false;
        }

        // Match "booleans" type value
        if ($this->enabled($feature) === true) {
            return true;
        }

        // If the feature value is zero, let's return false
        // since there's no uses available. (useful to disable
        // countable features)
        if ($feature_value === '0') {
            return false;
        }

        // Check for available uses
        return $this->remainings($feature) > 0;
    }
public function canUse ( $ feature ) { // Get features and usage $ feature_value = $ this -> value ( $ feature ) ; if ( is_null ( $ feature_value ) ) { return false ; } // Match "booleans" type value if ( $ this -> enabled ( $ feature ) === true ) { return true ; } // If the feature value is zero, let's return false // since there's no uses available. (useful to disable // countable features) if ( $ feature_value === '0' ) { return false ; } // Check for available uses return $ this -> remainings ( $ feature ) > 0 ; }
Determine if the feature is enabled and has
available uses.

@param string $feature
@return boolean
Determine if the feature is enabled and has available uses .