Get a data by key.

@param $key

@throws InvalidArgumentException

@return
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];
    }
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;
    }
569355
public function request($key = null)
    {
        if ($key) {

            if (!isset($_REQUEST[$key])) {
                throw new \InvalidArgumentException(sprintf(
                    '%s ist not a valid key for $_POST', $key
                ));
            }

            return $_REQUEST[$key];

        }

        return $_REQUEST;
    }
1286762
public function get(string $key)
    {
        if (array_key_exists($key, $this->data)) {
            return $this->data[$key];
        }

        return false;
    }
239120
public function nodeValue($key)
    {
        if (!isset($this->keyToIndexMap[$key]) || !$this->values[$this->keyToIndexMap[$key]] instanceof Node) {
            throw new \InvalidArgumentException(sprintf('value for %s is not of type %s', $key, 'NODE'));
        }

        return $this->value($key);
    }
612381
public static function get($key)
    {
        if (!$cache = self::getInstance()) {
            return false;
        }

        $key = self::prepare($key);

        try {
            if ($cache->hasItem($key)) {
                $item = $cache->getItem($key);
                if ($item->isHit()) {
                    return $item->get();
                }
            }
        } catch (InvalidArgumentException $e) {
            // something going wrong
            Logger::error($e->getMessage());
        }

        return false;
    }
1355560
public function getClient($key)
    {
        if (!isset($this->serviceMap[$key])) {
            throw new \InvalidArgumentException(sprintf(
                'There is no OAuth2 client called "%s". Available are: %s',
                $key,
                implode(', ', array_keys($this->serviceMap))
            ));
        }

        return $this->container->get($this->serviceMap[$key]);
    }
802065
public function get($key)
    {
        $key = strtolower($key);

        if (!isset($this->services[$key])) {
            throw new \InvalidArgumentException('Service not found: ' . $key);
        }

        // Have we been here before?
        if (isset($this->loadedService[$key])) {
            return $this->loadedService[$key];
        }

        if (!$this->services[$key] instanceof Service) {
            $this->loadedService[$key] = $this->services[$key];

            return $this->loadedService[$key];
        }

        // It's a Service instance, lets do some extra stuff.
        if (!$this->services[$key]->hasClassName()) {
            throw new \Exception('Unable to find class name from definition: ' . $key);
        }

        $className = $this->services[$key]->getClassName();
        $instance  = new $className();

        if ($this->services[$key]->hasFactoryMethod()) {
            call_user_func($instance, $this->services[$key]->getFactoryMethod());
        }

        $this->loadedService[$key] = $instance;

        return $this->loadedService[$key];
    }
165586
public function & get( $key )
	{
		if( !isset( $GLOBALS[$this->poolKey][$key] ) )
			throw new InvalidArgumentException( 'No Object registered with Key "'.$key.'"' );
		return $GLOBALS[$this->poolKey][$key];
	}
581479
public function getParam($key)
    {
        if (!isset($this->params[$key])) {
            throw new InvalidArgumentException("The request parameter with key '$key' is invalid."); 
        }
        return $this->params[$key];
    }
240730
public static function getData($key) {
		if(!isset(self::$output_data[$key]))
			return false;

		return self::$output_data[$key];
	}
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));
    }
610987
public function getIndexingProperty($key)
    {
        $this->loadIndexingProperties();

        if (!array_key_exists($key, $this->indexingProperties)) {
            throw new \InvalidArgumentException(
                'No indexing property "' . $key . '".',
                1323174143
            );
        }

        return $this->indexingProperties[$key];
    }
1214596
public function keys(?string $key = null) : array
    {
        $value = $this->get($key);

        if (!is_array($value)) {
            throw new InvalidArgumentException(
                'method keys() should be called on array'
            );
        }

        return array_keys($value);
    }
718963
function get($key) {
        if(\is_array($key) || \is_object($key)) {
            throw new \InvalidArgumentException('Key can not be an array or object');
        }
        
        $key = (string) $key;
        return parent::get($key);
    }
401380
public function getProvider($key)
    {
        if (!$this->hasProvider($key)) {
            throw new \InvalidArgumentException(sprintf('Location Provider with key "%s" does not exist', $key));
        }

        return $this->providers[$key];
    }
1179130
public function getExtractor($key)
    {
        if (!$this->hasExtractor($key)) {
            throw new \InvalidArgumentException(sprintf('Address extractor with key "%s" does not exist', $key));
        }

        return $this->extractors[$key];
    }