@param string $key

@return SettingSchema

@throws \InvalidArgumentException
480086
public function getSetting($key): SettingSchema
    {
        if (!$this->hasSetting($key)) {
            throw new \InvalidArgumentException("No setting key `$key` in this section.`");
        }

        return $this->settings[$key];
    }
261462
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->settingsHaveBeenRetrieved) {
            $this->retrieveSettings();
        }
        if (!isset($this->cachedSettings[$key])) {
            return null;
        }

        return $this->cachedSettings[$key];
    }
141019
public function info( $key ) {
		if (!$this->client) {
			throw new InvalidStorageSettingsException('Storage settings are invalid');
		}

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

		$defaults = stream_context_get_default();
		stream_context_set_default(['http'=>['method'=>'HEAD']]);
		$headers = get_headers($presignedUrl, 1);
		stream_context_set_default($defaults);

		$length = (arrayPath($headers, 'Content-Length', false));
		if ($length && is_array($length)) {
			$length = $length[count($length) - 1];
		}

		$type = (arrayPath($headers, 'Content-Type', false));
		if ($type && is_array($type)) {
			$type = $type[count($type) - 1];
		}

		if (empty($type) && empty($length)) {
			throw new StorageException("Unable to get Content-Type or Content-Length for '$key'");
		}

		$size = null;
		if (strpos($type, 'image/') === 0) {
			$faster = new FasterImage();
			$result = $faster->batch([$presignedUrl]);
			$result = $result[$presignedUrl];
			$size = $result['size'];
		}

		$fileInfo = new FileInfo($key,$presignedUrl, $length, $type, $size);
		return $fileInfo;
	}
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];
    }
424073
public function &__get($key)
    {
        if (!isset($this->service[$key])) {
            throw new InvalidArgumentException(sprintf('Value "%s" is not defined.', $key));
        }

        return
            isset($this->service[$key]) &&
            is_callable($this->service[$key]) ?
                $this->service[$key]($this) :
                $this->service[$key];
    }
81834
public function get(string $key)
    {
        if (!$this->has($key)) {
            throw new \InvalidArgumentException('Key "' . $key . '" does not exist.');
        }
        return $this->data[$key];
    }
427456
public function unsetProperty( $key )
    {

        // readonly safety check
        if( $this->readOnlySafetyCheck() ) {
            return 0;
        }

        if( is_scalar( $key ) ) {
            $keys = array( (string) $key );
        } elseif( is_array( $key ) ) {
            $keys = array_map( 'strval', $key );
        } else {
            throw new \InvalidArgumentException("Bad argument passed to " .__FUNCTION__ );
        }

        $numUnset = 0;

        // remove unsettable properties from this array
        $keys = array_diff( $keys, static::$unsetableProperties);

        // iterate over the keys
        foreach( $keys as $key ) {

            if( array_key_exists( $key, $this->data ) ) {

                if( $key === static::$lateLoadProperty and isset( $this->lateLoadKey ) ) {
                    unset( $this->lateLoadKey );
                    $numUnset++;
                } else {
                    $this->load();
                    if( isset( $this->data[$key] ) ) {
                        $this->data[$key] = null;
                        $numUnset++;
                    }
                }

            }

        }

        return $numUnset;

    }
321616
public function setKey($key)
    {
        try {
            $this->blockCipher->setKey($key);
        } catch (CryptException\InvalidArgumentException $e) {
            throw new Exception\InvalidArgumentException($e->getMessage());
        }
        $this->encryption['key'] = $key;
        return $this;
    }
274908
public function getHeaderParameter(string $key)
    {
        if ($this->hasHeaderParameter($key)) {
            return $this->header[$key];
        }

        throw new \InvalidArgumentException(\sprintf('The header "%s" does not exist', $key));
    }
579052
public function get($key)
    {
        if (!array_key_exists($key, $this->getDefaults())) {
            throw new InvalidArgumentException(sprintf('Key[%s] dont exists.', $key));
        }

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

        return $this->getDefaults()[$key];
    }
1322257
public function get(string $key)
    {
        $hash =  self::findFirst([
            'conditions' => "{$this->settingsKey} = ?0 and key = ?1",
            'bind' => [$this->getSettingsKey(), $key]
        ]);

        if ($hash) {
            return $hash->value;
        }

        return null;
    }
418603
public function __isset($key)
    {
        if ($this->flag == self::ARRAY_AS_PROPS) {
            return $this->offsetExists($key);
        }

        if (in_array($key, $this->protectedProperties)) {
            throw new \InvalidArgumentException('$key is a protected property, use a different key');
        }

        return isset($this->$key);
    }
1293952
public function getParameter($key)
    {
        $key = strtoupper($key);

        if (! isset($this->upperParameters[$key])) {
            throw new \InvalidArgumentException('Parameter ' . $key . ' does not exist.');
        }

        return $this->upperParameters[$key];
    }
82192
public function getParameter($key)
    {
        if ($this->hasParameter($key)) {
            return $this->parameters[$key];
        }

        throw new \InvalidArgumentException(
            sprintf('Wrong parameter key "%s" , invalid returned the key', $key)
        );
    }
925002
public function setKey($key)
    {
        $this->key = $key;

        if (!is_string($this->key) && $this->key !== null) {
            throw new \InvalidArgumentException('Key should be string');
        }

        return $this;
    }
622848
public function getParameter($key)
    {
        if (empty($this->namedParameters[$key])) {
            throw new InvalidKeyException($key);
        }

        return $this->namedParameters[$key];
    }
1036996
public function remove($key)
    {
        if (!$this->has($key)) {
            throw new InvalidException("Field {$key} does not exist");
        }
        unset($this->_data[$key]);

        return $this;
    }