Respect\Validation\Rules\KeyNested::getValue PHP Method

getValue() private method

private getValue ( $value, $key )
    private function getValue($value, $key)
    {
        if (is_array($value) || $value instanceof ArrayAccess) {
            return $this->getValueFromArray($value, $key);
        }
        if (is_object($value)) {
            return $this->getValueFromObject($value, $key);
        }
        $message = sprintf('Cannot select the property %s from the given data', $this->reference);
        throw new ComponentException($message);
    }