public function getFeatureVariableFromKey($featureFlagKey, $variableKey)
    {
        $featureFlag = $this->getFeatureFlagFromKey($featureFlagKey);
        if ($featureFlag && !($featureFlag->getKey())) {
            return null;
        }

        if (isset($this->_featureFlagVariableMap[$featureFlagKey])
            && isset($this->_featureFlagVariableMap[$featureFlagKey][$variableKey])
        ) {
            return $this->_featureFlagVariableMap[$featureFlagKey][$variableKey];
        }

        $this->_logger->log(
            Logger::ERROR,
            sprintf(
                'No variable key "%s" defined in datafile for feature flag "%s".',
                $variableKey,
                $featureFlagKey
            )
        );
        $this->_errorHandler->handleError(
            new InvalidFeatureVariableException('Provided feature variable is not in datafile.')
        );
        return null;
    }
public function getFeatureVariableFromKey($featureFlagKey, $variableKey)
    {
        $featureFlag = $this->getFeatureFlagFromKey($featureFlagKey);
        if ($featureFlag && !($featureFlag->getKey())) {
            return null;
        }

        if (isset($this->_featureFlagVariableMap[$featureFlagKey])
            && isset($this->_featureFlagVariableMap[$featureFlagKey][$variableKey])
        ) {
            return $this->_featureFlagVariableMap[$featureFlagKey][$variableKey];
        }

        $this->_logger->log(
            Logger::ERROR,
            sprintf(
                'No variable key "%s" defined in datafile for feature flag "%s".',
                $variableKey,
                $featureFlagKey
            )
        );
        $this->_errorHandler->handleError(
            new InvalidFeatureVariableException('Provided feature variable is not in datafile.')
        );
        return null;
    }
public function getFeatureVariableFromKey ( $ featureFlagKey , $ variableKey ) { $ featureFlag = $ this -> getFeatureFlagFromKey ( $ featureFlagKey ) ; if ( $ featureFlag && ! ( $ featureFlag -> getKey ( ) ) ) { return null ; } if ( isset ( $ this -> _featureFlagVariableMap [ $ featureFlagKey ] ) && isset ( $ this -> _featureFlagVariableMap [ $ featureFlagKey ] [ $ variableKey ] ) ) { return $ this -> _featureFlagVariableMap [ $ featureFlagKey ] [ $ variableKey ] ; } $ this -> _logger -> log ( Logger :: ERROR , sprintf ( 'No variable key "%s" defined in datafile for feature flag "%s".' , $ variableKey , $ featureFlagKey ) ) ; $ this -> _errorHandler -> handleError ( new InvalidFeatureVariableException ( 'Provided feature variable is not in datafile.' ) ) ; return null ; }
Gets the feature variable instance given feature flag key and variable key

@param string Feature flag key
@param string Variable key

@return FeatureVariable / null
Gets the feature variable instance given feature flag key and variable key