@param  string $pointer The Json Pointer.
@throws \Rs\Json\Pointer\InvalidPointerException
@throws \Rs\Json\Pointer\NonexistentValueReferencedException

@return mixed
963930
public function get($pointer)
    {
        if ($pointer === '') {
            $output = json_encode($this->json, JSON_UNESCAPED_UNICODE);
            // workaround for https://bugs.php.net/bug.php?id=46600
            return str_replace('"_empty_"', '""', $output);
        }

        $this->validatePointer($pointer);

        $this->pointer = $pointer;

        $plainPointerParts = array_slice(
            array_map('urldecode', explode('/', $pointer)),
            1
        );
        return $this->traverse($this->json, $this->evaluatePointerParts($plainPointerParts));
    }
827734
public function getParameter($key) {
    if (is_string($key)) {
      return $this->getParameterByName($key);
    }
    elseif (is_integer($key)) {
      return $this->getParameterAtIndex($key);
    }
    else {
      throw new \InvalidArgumentException("Illegal parameter index {$key}.");
    }
  }
1269165
private function getAccessorForNode($node, $pointer, $currentPath)
    {
        try {
            $accessor = $this->factory->findAccessorForNode($node);
        } catch (NoMatchingAccessorException $exception) {
            throw new InvalidPathException(
                sprintf(
                    'The path %s in %s contains an not supported type: %s',
                    $currentPath,
                    is_array($pointer) ? implode('/', $pointer) : $pointer,
                    gettype($node)
                ),
                0,
                $exception
            );
        }

        return $accessor;
    }
1328614
public static function createArgs(array $pointer, array $context)
    {
        if (array_key_exists('args', $pointer)) {
            $args = $pointer['args'];
            if (!is_array($args)) {
                throw new InvalidPointer('args must be an array');
            }
        } elseif (array_key_exists('options', $pointer)) {
            $args = [$pointer['options']];
        } else {
            $args = [];
        }
        if (!empty($pointer['reset_args'])) {
            return $args;
        }
        if (!empty($context['args'])) {
            $args = array_merge($context['args'], $args);
        }
        if (!empty($context['append_args'])) {
            $args = array_merge($args, $context['append_args']);
        }
        return $args;
    }
300321
public function get($index): JWK
    {
        if (!$this->has($index)) {
            throw new InvalidArgumentException('Undefined index.');
        }

        return $this->keys[$index];
    }
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];
    }
1067036
public static function invalidParameter($actualParameter, array $allowedParameter, $keyword, $pointer)
    {
        $message = sprintf(
            'Value is "%s" but must be one of: "%s"',
            $actualParameter,
            implode(', ', $allowedParameter)
        );

        return new self($message, $keyword, $pointer);
    }
178279
private function checkAccess($mode, $node, JsonPointerInterface $pointer)
    {
        $pathElements = $pointer->toArray();
        $lastPath = array_pop($pathElements);
        try {
            $lastNode = &$this->getNodeReference($node, $pathElements);
            $accessor = $this->getAccessorForNode($lastNode, $pointer, $lastPath);
        } catch (InvalidPathException $exception) {
            return false;
        }

        return $accessor->{'is'.$mode}($lastNode, $lastPath);
    }
1106853
private function readTimeZone($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $timeZone = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::TIME_ZONE][$this->type]) {
      // If the field is not suported, return accordingly
      $timeZone = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read the time zone
      $timeZone = $this->readString($pointer + self::$columns[self::TIME_ZONE][$this->type]);
    }
    return $timeZone;
  }
535250
public function getValue(array $keys, $default = null)
    {
        $config = $this->config;
        $pointer = &$config;
        foreach ($keys as $key) {
            if (!array_key_exists($key, $pointer)) {
                if ($default === null) {
                    throw new InvalidArgumentException(sprintf(
                        'Key "%s" does not exist',
                        implode('.', $keys)
                    ));
                }
                return $default;
            }
            $pointer = &$pointer[$key];
        }
        return $pointer;
    }
1100602
public function set($pointer, $data)
    {
        if ($pointer === '') {
            throw new \InvalidArgumentException('Cannot replace the object with set.');
        }

        $pointer = $this->parse($pointer);
        $replace = array_pop($pointer);
        $target  = &$this->getTarget($pointer);

        if (is_array($target)) {
            if ($replace === '-') {
                $target[] = $data;
            } else {
                $target[$replace] = $data;
            }
        } elseif (is_object($target)) {
            $target->$replace = $data;
        } else {
            throw InvalidPointerException::invalidTarget($target);
        }
    }
1316169
public static function get($key)
    {
        $key = strtoupper($key);

        $list = static::loadConstants();

        if(array_key_exists($key,$list))
            return static::loadConstants()[$key];

        if(static::exist($key))
            return $key;

        // Throw exception.
        static::invalidType();
    }
272833
public function get($key)
    {
        if (($data = $this->do_get($key)) === false) {
            $this->eventsManager->fireEvent('cache:miss', $this, ['key' => $key]);
            return false;
        }

        $this->eventsManager->fireEvent('cache:hit', $this, ['key' => $key]);

        if ($data[0] !== '{' && $data[0] !== '[') {
            return $data;
        }

        $json = json_decode($data, true);
        if ($json === null) {
            throw new InvalidJsonException([
                '`:key` key cache value json_encode failed: `:code` `:message`',
                'key' => $key,
                'code' => json_last_error(),
                'message' => json_last_error_msg()
            ]);
        }

        if (count($json) === 1 && key($json) === '_wrapper_') {
            return $json['_wrapper_'];
        } else {
            return $json;
        }
    }
743411
private function readRegionName($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $regionName = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::REGION_NAME][$this->type]) {
      // If the field is not suported, return accordingly
      $regionName = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read the region name
      $regionName = $this->readString($pointer + self::$columns[self::REGION_NAME][$this->type]);
    }
    return $regionName;
  }
853050
public function convert(Response $response)
    {
        if ($response->type == null) {
            return;
        }

        if ($response->type == 'counter') {
            return $this->convertCounter($response);
        }

        if ($response->type == 'set') {
            return $this->convertSet($response);
        }

        if ($response->type == 'map') {
            return $this->convertMap($response);
        }

        throw new InvalidArgumentException("Unknown crdt type : {$response->type}");
    }
334780
public function setFilePointer($pointer)
	{
		if(!is_resource($pointer))
			throw new InvalidArgumentException("Invalid type - not a file resource");
		
		$this->pointer = $pointer;
		
		# and now to set everything up...
		$metadata = stream_get_meta_data($this->pointer);
		
		# can this stream be read from?
		if(isset($metadata["mode"]))
		{
			$mode = rtrim($metadata["mode"], "bt");
			
			$super = (boolean) preg_match("/\+$/", $mode);
			$mode = rtrim($mode, "+");
			
			switch($mode)
			{
				case "r":
					$this->is_readable = true;
				break;
				
				case "w":
				case "a":
				case "x":
				case "c":
					$this->is_readable = $super;
				break;
				
				default:
					throw new LogicException("Invalid file access type: '".$metadata["mode"]."'");
				break;
			}
		}
		
		# can this stream be written to?
		if(isset($metadata["mode"]))
		{
			$mode = rtrim($metadata["mode"], "bt");
			
			$super = (boolean) preg_match("/\+$/", $mode);
			$mode = rtrim($mode, "+");
			
			switch($mode)
			{
				case "r":
					$this->is_writable = $super;
				break;
				
				case "w":
				case "a":
				case "x":
				case "c":
					$this->is_writable = true;
				break;
				
				default:
					throw new LogicException("Invalid file access type: '".$metadata["mode"]."'");
				break;
			}
		}
		
		# does this stream support seek functionality?
		if(isset($metadata["seekable"]))
			$this->is_seekable = (boolean) $metadata["seekable"];
		
		return null;
	}
830206
public function get($key)
    {
        if (!array_key_exists($key, $this->options)) {
            throw new InvalidArgumentException(sprintf('The key %s does not exist.', $key));
        }

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