returns new Data object populated with its data[$key].

@param string $key
@return static
330517
public function extractKey($key)
    {
        $self       = clone($this);
        $self->data = Accessor::get($this->data, $key) ?: [];
        return $self;
    }
161833
public static function createFromArray($key, array $data = [])
    {
        $webFormBody = new static($key);

        if (isset($data['formParameters'])) {
            foreach ($data['formParameters'] as $namedParam => $namedParamData) {
                if (\is_array($namedParamData)) {
                    $webFormBody->addParameter(NamedParameter::createFromArray($namedParam, $namedParamData));
                }
            }
        }

        return $webFormBody;
    }
923987
public function column(string $name, ?string $key = null): self
    {
        return new static(array_column($this->storage, $name, $key));
    }
1264079
protected function objectForKey($key)
    {
        return DataObject::get($this->getSourceObject())
            ->filter($this->getKeyField(), $key)
            ->first();
    }
91694
public function build(string $key)
    {
        if ($this->has($key)) {
            $object = $this->get($key);
        } else {
            $object = $this->create($key);
            $this->inject($key, $object);
        }

        return $object;
    }
748421
public function unsetData($key = null)
    {
        if (is_string($key) && 0 < strlen($key)) {
            unset($this->data[$key]);
        } else {
            $this->data = [];
        }

        return $this;
    }
392517
public function delete($key)
    {
        key_exists_or_fail($key, $this->data);
        unset($this->data[$key]);
        $this->data = array_values($this->data);

        return $this;
    }
673775
public function getKey($key)
	{
		return isset($this->data[$key]) ? $this->data[$key] : null;
	}
669691
public function &__get($key)
    {
        $return = $this->get($key);

        if (\is_array($return)) {
            return static::create($return, $this->iteratorClass, false);
        }

        return $return;
    }
930216
public function create(string $key = null)
    {
        if ($key) {
            $this->setStorageKey($key);
        }

        if ($this->exists()) {
            throw new \RuntimeException('Cannot create new object (Already exists)');
        }

        return $this->save();
    }
300496
public function groupBy(string $key)
    {
        $items = [];
        foreach ($this->items as $item) {
            $items[$item[$key]][] = $item;
        }
        return new static($items);
    }
675105
public function getData($key = ''){

        $key = $this->normalizeKeyName($key);

        if( $key === '' ){
            return $this->_data;
        }

        return isset($this->_data[$key]) ? $this->_data[$key] : NULL;
    }
406934
public function get(string $key): string
    {
        if (!isset($this->data[$key])) {
            $this->data[$key] = $key;
        }

        return $this->data[$key];
    }
1092682
public function get($key = null)
    {
        $this->_prepareData($key);
        $data = null;

        if (is_null($key)) {
            $data = $this->_DATA;
        } elseif (array_key_exists($key, $this->_DATA)) {
            $data = $this->_DATA[$key];
        }

        if ($this->_getPreparationOn) {
            return $this->_dataPreparation($key, $data, $this->_dataRetrieveCallbacks);
        }
        return $data;
    }
380641
public function load($key)
    {
        $data = $this->adapter->getItem($key, $success);

        if ($success && $this->automaticSerialization) {
            $data = unserialize($data);
            
            if ($data === false) {
                $this->remove($key);
            }
        }

        return $data;
    }
142145
public function get($key) {
		// If the key is in factories the return new instance of class
		if (isset($this->factories[$key])) {
			return $this->factories[$key]();
		}

		// If the key is not in instances
		if (!isset($this->instances[$key])) {
			// If the key is in registry, instanciate the corresponding class and add it in instances
			if (isset($this->registry[$key])) {
				$this->instances[$key] = $this->registry[$key]();
			} else {
				// If the key is not in registry, instanciate the corresponding class and add it in instances
				$this->instances[$key] = self::newInstance($key);
			}
		}

		return $this->instances[$key];
	}
147979
public function key($key = null) {
		if($key === null) return $this->key;
		$this->key = $key;
		return $this;
	}