Get value of $data using $key

@param array $data A CSV line
@return string
@throws MetadataReaderNotFoundException
172602
public function getValue(array $data)
    {
        $key = strtolower($this->key);
        if ($this->hasValue($data, $key)) {
            return $data[$key];
        }

        throw new MetadataReaderNotFoundException(__CLASS__ . ' cannot found value associated to key "' . $this->key . '".');
    }
180420
protected function getWildcardValues($data, array $keys) {
        $values = [];

        if ( ! is_array($data) && ! $data instanceof Traversable) {
            if ($data instanceof IArrayable) {
                $data = $data->toArray();
            }

            if ( ! is_array($data)) {
                $data = [];
            }
        }

        if (count($keys) === 0) {
            foreach ($data as $itemKey => $itemValue) {
                $values[$itemKey] = $itemValue;
            }
        }

        if (count($keys) > 0) {
            foreach ($data as $itemKey => $itemValue) {
                // since there are still selector keys left and the next
                // item is not an array, it is safe to skip it
                if ( ! is_array($itemValue)) {
                    continue;
                }

                $nestedValues = $this->getValues($itemValue, $keys);

                foreach ($nestedValues as $nestedKey => $nestedValue) {
                    $values[$this->buildKey($itemKey, $nestedKey)] = $nestedValue;
                }
            }
        }

        return $values;
    }
192638
public function getMetadata($key, $default = null)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('Non-string argument provided as a metadata key');
        }

        if (array_key_exists($key, $this->metadata)) {
            return $this->metadata[$key];
        }

        return $default;
    }
313110
protected function arrayDotKeysFlattern(array $data)
    {
        foreach ($data as $name => $values) {
            if ($this->isIterable($values)) {
                foreach ($values as $key => $key_value) {
                    $data["$name.$key"] = $values[$key];
                }
                unset($data[$name]);
            }
        }
        return $data;
    }
1172270
public function parseData($data, array $modes, $key = null)
    {
        $return = [];

        uksort($modes, function ($a, $b) {
            return substr_count($b, '.')-substr_count($a, '.');
        });

        if (Utility::isCollection($data)) {
            $parsed = $this->parseCollection($modes, $data, $return);
        } else {
            $parsed = $this->parseResource($modes, $data, $return);
        }

        if ($key !== null) {
            $return[$key] = $parsed;
        } else {
            if (in_array('sideload', $modes)) {
                throw new InvalidArgumentException('$key cannot be null when ' .
                                    'resources are transformed using sideload.');
            }

            $return = $parsed;
        }

        return $return;
    }
559183
public static function get($data, $key, $default = null)
    {
        if (self::isArrayAccess($data)) {
            return self::getArray($data, $key, $default);
        }
        if (is_object($data)) {
            return self::getObj($data, $key, $default);
        }

        return $default;
    }
407525
def __get_value_from_data(self, key, data):
        
        if key.isdigit():
            return data[int(key)]

        if key not in data:
            raise KeyError("Key not exists")

        return data.get(key)
1355870
public function getMetadataQuery($data, $metadata)
    {
        foreach ($metadata as $searchMetadata) {
            $data[] = $this->setData(['metadata' => $searchMetadata], 'input');
        }

        return $data;
    }
412507
public static function parseArray(array $data)
    {
        $type = strtoupper($data['data_type']);
        if (!defined(static::class . '::' . $type))
            throw new InvalidValueException("Invalid column type: $type");
            
        return array(
            'name' => $data['column_name'],
            'type' => $type,
            'max_length' => $data['character_maximum_length'] ?? null,
            'is_nullable' => isset($data['is_nullable']) ? $data['is_nullable'] == true : false,
            'column_default' => $data['column_default'] ?? null,
            'numeric_precision' => $data['numeric_precision'] ?? null,
            'numeric_scale' => $data['numeric_scale'] ?? null,
            'serial' => isset($data['serial']) ? $data['serial'] == true : false,
            'enum_values' => $data['enum_values'] ?? null
        );
    }
921957
protected function unformatPayloadData(array $data)
    {
        $unformattedData = array();

        foreach ($data as $key => $value) {
            $newKey = $this->deserializeColumnName($key);

            if (is_array($value)) {
                $newValue = $this->unformatPayloadData($value);
            } else {
                $newValue = $value;
            }

            $unformattedData[$newKey] = $newValue;
        }

        return $unformattedData;
    }
1339735
private function getValue($key)
    {
        if (array_key_exists($key, $this->data)) {
            return $this->data[$key];
        }

        throw new AccessException('Could not get the value for the key "' . $key . '".');
    }
641955
public static function keyGet( $data )
    {

        // Is a Entity object ?
        $class = get_called_class();
        if( $data instanceof $class ) {

            $keys = array();
            foreach( static::$keyProperties as $property ) {

                $value = $data->get($property);

                // resolve entities back down to their key
                if( $value instanceof Base ) {
                    $value = call_user_func(
                        array( get_class($value), 'keyGet' ),
                        $value
                    );
                }

                $keys[$property] = $value;

            }

         // is a data array
        } elseif( is_array( $data ) ) {
            $keys = array_intersect_key(
                $data,
                array_flip( static::$keyProperties )
            );
        }

        // build and return the key
        if( isset( $keys ) ) {

            $key = implode( self::KEY_SEPARATOR, $keys );
            return strlen( trim( $key, self::KEY_SEPARATOR ) ) === 0
                ? null
                : $key;

        }

        throw new BadKeyException("Cant determine a key from this");

    }
105273
protected function parseTexts(array $data)
    {
        foreach ($this->parseKeys as $key) {

            if (!isset($data[$key]) || !is_string($data[$key])) {
                continue;
            }

            $data[$key] = $this->textParser->parse($data[$key], $data);

        }

        return $data;
    }
953147
public function getData( $key = NULL ){
		if( is_null( $key ) )
			return $this->data ;
		if( !array_key_exists( $key, $this->data ) )
			return NULL;
		return $this->data[$key];
	}
392912
private function getValueByKey(array $data, $key, $default = null)
    {
        if (!is_string($key) || empty($key) || !count($data)) {
            return $default;
        }

        if (strpos($key, '.') !== false) {
            $keys = explode('.', $key);

            foreach ($keys as $innerKey) {
                if (!is_array($data) || !array_key_exists($innerKey, $data)) {
                    return $default;
                }

                $data = $data[$innerKey];
            }

            return $data;
        }

        return array_key_exists($key, $data) ? $data[$key] : $default;
    }
123320
public function getFieldValues(array $data) : array
    {
        $result = [];
        foreach ($this->getFields() as $field) {
            $result[$field] = array_key_exists($field, $data) ? $data[$field] : null;
        }

        return $result;
    }
1306346
public function resolveDataValue($data)
    {
        if ($data instanceof Data) {

            return $this->setData($data);

        } elseif (is_array($data)) {

            return $this->setData(new Data($data));
        }

        throw new \InvalidArgumentException(
            "Data must be View\Data or array value"
        );
    }