Get current plugin data.

@param array $data
@param null|string $key
@return Data
321961
protected static function _getPluginData(array $data, $key = null)
    {
        if (isset($data[$key])) {
            $data = $data[$key];
        }

        return new Data($data);
    }
567076
public function indexBy(array $data, $key)
    {
        $newData = [];
        foreach ($data as $row) {
            $newData[$row[$key]] = $row;
        }

        return $newData;
    }
430716
public function getAdditionalData($key)
    {
        if (true === isset($this->additionalData[$key])) {
            return $this->additionalData[$key];
        }

        return null;
    }
748924
public function returnOriginalData($key = null)
    {
        $this->_prepareData($key);

        $mergedData = array_merge($this->_DATA, $this->_originalDATA);
        $data       = $this->_removeNewKeys($mergedData);

        if (array_key_exists($key, $data)) {
            return $data[$key];
        }

        return null;
    }
485693
public function get($key)
    {
        $this->initialize();

        $ids = explode('.', $key);
        $base = &$this->data;

        while ($current = array_shift($ids)) {
            if (is_array($base) && array_key_exists($current, $base)) {
                $base = &$base[$current];
            } else {
                return null;
            }
        }

        return $base;
    }
155372
public function get($key = null) {
		if ($key === null) {
			return $this->data;
		} else if (is_object($this->data) && isset($this->data->{$key})) {
			return $this->data->{$key};
		} elseif (is_array($this->data) && isset($this->data[$key])) {
			return $this->data[$key];
		}
		return null;
	}
449226
public function get(string $key)
    {
        if (!isset($this->data[$this->activeAssetSourceIdentifier])) {
            $this->initializeData($this->activeAssetSourceIdentifier);
        }
        return $this->data[$this->activeAssetSourceIdentifier][$key] ?? null;
    }
1002446
public function getData($key = null, $default = null)
    {
        if (!isset($key)) {
            return $this->data;
        }

        $result = gplcart_array_get($this->data, $key);
        return isset($result) ? $result : $default;
    }
582042
public function getRaw($key = null){
        if(null === $key){
            return $this->_data;
        }
        else{
            return isset($this->_data[$key])?$this->_data[$key]:null;
        }
    }
937668
public function get($key, $default = null)
    {
        $key = strtolower($key);

        if (!array_key_exists($key, $this->data)) {
            if (null === $default) {
                return null;
            }

            return $default;
        }

        return $this->data[$key];
    }
1271233
public function getFromArray(string $key, array $data, string $default = null)
    {
        $value = $default;

        if (\array_key_exists($key, $data)) {
            $value = $data[$key];
        }

        return $value;
    }
239667
public function getMetadata($key = null)
	{
		if (! \is_resource($this->resource))
		{
			return null;
		}

		$metadata = \stream_get_meta_data($this->resource);

		if (! (null === $key))
		{
			return $metadata[$key] ?? null;
		}

		return $metadata;
	}
88383
public function get($key)
    {
        if (is_null($this->data)) {
            $this->data = $this->table->getColumn($this->name)->toArray();
        }

        return $this->data[$key];
    }
1041258
public function get_data($key) {
        if (isset($this->data->$key)) {
            return $this->data->$key;
        }
        return null;
    }
642178
protected function getCurrent($key)
    {
        if (isset($this->current[$key])) {
            return $this->current[$key];
        }
        return null;
    }
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];
	}
1003953
public function getData($key = null)
	{
		if ($key !== null) {
			return array_key_exists($key, $this->data) ? $this->data[$key] : null;
		}

		return $this->data;
	}