Get an element given it's key

@param  string  $key
@return Bkwld\Decoy\Models\Element
961444
public function get($key, $default = null)
    {
        $this->hydrate();

        // Create an Element instance using the data for the key
        if ($this->has($key)) {
            return new $this->model(array_merge($this->items[$key], ['key' => $key]));
        }

        // If the key doesn't exist but a default was passed in, return it
        if ($default) {
            return $default;
        }

        // if the key doesn't exist, but running locally, throw an exception
        if (App::isLocal()) {
            throw new Exception("Element key '{$key}' is not declared in elements.yaml.");
        }

        // Otherwise, like if key doesn't exist and running on production,
        // return an empty Element, whose ->toString() will return an empty string.
        Log::error("Element key '{$key}' is not declared in elements.yaml.");
        return new $this->model();
    }
896206
public function get($key)
    {
        if (!isset($this->elements[$key])) {
            throw new InvalidArgumentException('Adapter does not exist');
        }

        return $this->elements[$key];
    }
547580
public function offsetGet($key)
    {
        if (($index = $this->keysIndices[self::keyString($key)] ?? null) === null) {
            return null;
        }

        return $this->values[$index];
    }
1192877
public function &offsetGet($key)
    {
        if (!isset($this->storage[$key])) {
            $this->storage[$key] = null;
        }

        return $this->storage[$key];
    }
1188536
public function get(?string $key = null)
    {
        $key = $this->constructKey($key);

        if (is_null($key)) {
            $array = $this->toArray();

            return $this->count() == 1 ? end($array) : $array;
        }

        return $this->parseKey($key, function ($part, $result) {
            if (isset($result[$part])) {
                return $result[$part];
            }
        });
    }
611243
public function get($key)
    {
        $getResult = $this->getValue($key);
        $unserialized = @unserialize($getResult);

        if (Util::hasInternalExpireTime($unserialized)) {
            $getResult = $unserialized['v'];
        }

        return $getResult;
    }
679015
protected function get($key)
    {
        return $this->getFrontEndController()->fe_user->getKey(self::$types[$this->type], $key);
    }
1123432
public function get($key) {
        $value = $this->_data[$key] ?? null;

        if ($value instanceof \Closure) {
            $value = $value();
            $this->set($key, $value);
        }
        return $value;
    }
143779
public function offsetGet($key)
    {
        if(array_key_exists($key, $this->resolved)) {
            return $this->resolved[$key];
        }

        return $this->make($key);
    }
576336
public function get($key)
	{
		$value = xcache_get($this->id($key));

		if (isset($value))
		{
			return $value;
		}
	}
971575
public function get($key)
  {
    return isset($this->attr[$key]) ? $this->attr[$key] : false;
  }
1293384
public function get($key)
    {
        $key = $this->createKey($key);
        return $this->instance->get($key);
    }
810919
public function offsetGet($key)
    {
        if (! isset($this->data[$key]) or is_array($this->data[$key])) {
            return $this->getSubset($key);
        }
        return $this->data[$key];
    }
215345
public function findItemByKey(string $key)
    {
        return $this->items->first(function (BaseItem $item, $index) use ($key) {
            return $item->getKey() == $key;
        });
    }
1264079
protected function objectForKey($key)
    {
        return DataObject::get($this->getSourceObject())
            ->filter($this->getKeyField(), $key)
            ->first();
    }
1341915
public function getItem($key)
    {
        $this->validateKey($key);

        if ($this->hasItem($key)) {
            return $this->data[$key];
        }

        # If we didn't find a suitable item then create a new one now
        return new Item($key);
    }
321980
public function &offsetGet($key)
    {
        if(!$this->has($key))
            return null;

        return DotArray::getReference($this->storage, $key);
    }