Handle the dynamic retrieval of attachment objects.

@param string $key

@return mixed
964942
public function getAttribute($key)
    {
        if (array_key_exists($key, $this->attachedFiles)) {
            return $this->attachedFiles[ $key ];
        }

        return parent::getAttribute($key);
    }
1360512
public function pull($key)
    {
        $item = $this->get($key);

        $this->remove($key);

        return $item;
    }
41867
public static function get($key)
    {
        $path = Cache::path($key);

        if (file_exists($path)) {
            return file_get_contents($path);
        }

        return null;
    }
1166679
public function get($key)
	{
		$success = false;
		$value = apc_fetch($key, $success);
		$item = new Item($key);

		if ($success)
		{
			$item->setValue($value);
		}

		return $item;
	}
518790
public function get(string $key): Promise
    {
        try {
            $file = $this->cacheDir . urlencode($key);
            if (!file_exists($file)) {
                return Promise\resolve(null);
            }
            return Promise\resolve(unserialize(file_get_contents($file)));
        } catch (\Exception $e) {
            return Promise\resolve(null);
        }
    }
1245180
public function get($key)
    {
        $file = $this->getFilePath($key);

        if (file_exists($file)) {
            $data = file_get_contents($file);

            if (!empty($data)) {
                return $data;
            }
        }

        return false;
    }
835746
public function getOneByKey($key)
	{
		// Note: this switch exists like this because PHP does not have "traditional method overloading".
		switch(gettype($key))
		{
			// Use EntityIdentifier to retrieve.
			case 'object':
				return $this->getOneByIdentifier($key);
			break;

			// Use a composite key to retrieve.
			case 'array':
				return $this->getOneByCompoundKey($key);
			break;

			// Use an actual Identifier string to retrieve.
			case 'string':
				return $this->getOneByUuid($key);
			break;

			// Use Entity to retrieve.
			default:
				return new Payload($key, 'invalid_key_type');
		}
	}
472044
protected function retrieve($key)
    {
        if (!$this->has($key)) {
            return null;
        }

        $cache = file_get_contents($this->path . $key);

        // compare the timestamp to the current time when we read the file.
        if (time() >= substr($cache, 0, 10)) {
            $this->forget($key);
            return null;
        }

        return unserialize(substr($cache, 10));
    }
1221067
public function get($key)
    {
        $filename = $this->getKeyCode($key);

        if ($this->fileExists($filename)) {
            $value = $this->read($filename);
        } else {
            return null;
        }

        return json_decode($value, true);
    }
1190924
public static function get(string $key)
    {
        if (!in_array($key, self::$allowedKeys) || !isset(self::$storedValues[$key])) {
            throw new \InvalidArgumentException('Invalid key given');
        }

        return self::$storedValues[$key];
    }
1048481
public function get($key)
    {
        if (!$this->has($key)) {
            return null;
        }

        $file = $this->directory . substr(md5($this->prefix() . $key), 0, 10) . '.dat';

        return unserialize(file_get_contents($file));
    }
1264079
protected function objectForKey($key)
    {
        return DataObject::get($this->getSourceObject())
            ->filter($this->getKeyField(), $key)
            ->first();
    }
330517
public function extractKey($key)
    {
        $self       = clone($this);
        $self->data = Accessor::get($this->data, $key) ?: [];
        return $self;
    }
584891
public function fetch($key) {
		$result = $this->cacheInstance->getItem ( $this->getRealKey ( $key ) )->get ();
		return eval ( $result );
	}
1041761
public function load($key)
    {
        if (file_exists($path = $this->path . $key)) {
            return unserialize(file_get_contents($path));
        }

        return null;
    }
1038602
public static function files(string $key = null)
    {
        if (!isset($_FILES[$key])) {
            return null;
        }
        if (is_array($_FILES[$key]['name'])) {
            return self::getFileObjects($key);
        } else {
            return new filesystem\UploadedFile($_FILES);
        }
    }
1102159
protected function snapshotsFor($key)
    {
        return collect($this->connection()->zrange('snapshot:'.$key, 0, -1))
            ->map(function ($snapshot) {
                return (object) json_decode($snapshot, true);
            })->values()->all();
    }