Returns the value to be injected in this parameter.

@param mixed                $data    The data generated by "getFetcherData"
@param SplashRequestContext $context

@return mixed
177220
public function fetchValue($data, SplashRequestContext $context)
    {
        $key = $data['key'];
        $compulsory = $data['compulsory'];
        $default = $data['default'] ?? null;

        return $context->getParameter($key, $compulsory, $default);
    }
107217
public function fetch(ConnectionContext $context, $source)
    {
        if ($context->mustCache()) {
            $options = $this->connector instanceof ConnectorOptions ? $this->connector->getOptions()->copy() : [];
            ksort($options);

            $this->validateCacheKey($key = $this->cacheKeyGenerator->generateCacheKey($source, $options));

            if ($this->cache->hasItem($key)) {
                return $this->cache->getItem($key)->get();
            }
        }

        $data = $this->connector->fetch($context, $source);

        isset($key) && $this->cache->save($this->cache->getItem($key)->set($data));

        return $data;
    }
1021266
public function getFilteredData($context = null)
    {
        $data = $this->getRawData();
        foreach ($data as $offset => $value) $data[$offset] = $this->getFilteredValue($offset, $context);

        return $data;
    }
946956
protected function getPropertyValue(Context $context)
    {
        $propertyValue = null;

        foreach ($this->propertyPaths as $path) {
            if (null !== $propertyValue = SimpleAccessor::getValueFromPath($context, $path)) {
                break;
            }
        }

        return $propertyValue;
    }
1007328
protected static function encode($data, array $context)
    {
        $result = base64_encode($data);

        if (false === $result) {
            static::throwEncodingException($data);
        }

        if ($context['base64_encode_url_safe']) {
            return str_replace('=', '', strtr($result, '+/', '-_'));
        }

        return $result;
    }
1077744
public function getValueFromData($data, $default = null)
    {
        $fieldName = $this->valueFrom ?: $this->fieldName;
        return $this->getFieldNameFromData($fieldName, $data, $default);
    }
954032
protected static function decode($data, array $context)
    {
        if ($context['base64_decode_url_safe']) {
            $data = static::getUrlSafeData($data);
        }

        $result = base64_decode($data, $context['base64_decode_strict']);

        if (false === $result) {
            static::throwDecodingException($data);
        }

        return $result;
    }
1246278
public function execute($data = null)
    {
        $data->repository->transactionStart(true);

        try {
            $result = $this->next->execute($data);
        } catch (\Throwable $e) {
            $data->repository->transactionRollback(true);

            throw $e;
        }

        $data->repository->transactionCommit(true);

        return $result;
    }
270433
public function getData($data)
    {
        if ($this->hasData($data)) {
            return $this->getAttribute(sprintf('data-%s', $data));
        } else {
            return false;
        }
    }
1150980
public function getTarget(OperationContextInterface $context = null)
    {
        $context = $this->ensureContext($context);
        $targetId = $this->getTargetId();
        if ($targetId === null) {
            return null;
        }

        return $this->getSession()->getObject($targetId, $context);
    }
1040263
public function getDataWrapper($data = null)
    {
        // if $data is set reconstruct the data wrapper
        if (!$this->dataWrapper || $data) {
            $this->dataWrapper = new DataWrapper\ArrayWrapper($data);
        }

        return $this->dataWrapper;
    }
82390
protected function process($context, $data)
	{
		// Make sure the given context is all uppercase.
		$context = strtoupper($context);

		// Ensure the given context is configured before processing.
		if(is_null($this->getConfiguration($context)))
		{
			return new Payload(null, strtolower($context . '_not_configured'));
		}

		//  Finally, process the data.
		return $this->processor->process($data, $this->getConfiguration($context)['keys'], $this->getConfiguration($context)['rules'], $this->getConfiguration($context)['defaults']);
	}
379183
public function visitValueObject($data)
    {
        $this->valueObjectVisitorDispatcher->setOutputGenerator($this->generator);
        $this->valueObjectVisitorDispatcher->setOutputVisitor($this);

        return $this->valueObjectVisitorDispatcher->visit($data);
    }
270245
public function transformGetToPut($data)
    {
        // Fix ridiculous klipfolio GET/PUT difference
        foreach ($data[ClientResource::FIELD_RESOURCES] as &$resource) {
            if (in_array($resource['name'], $this->map)) {
                $resource['name'] = array_search($resource['name'], $this->map);
            }
        }
        return $data;
    }
574139
public static function getDispatcherFromParametersData(array $data): string
    {
        assert(array_key_exists(self::KEY_ROUTER_PARAMS__DISPATCHER, $data));
        $result = $data[self::KEY_ROUTER_PARAMS__DISPATCHER];
        assert(empty($result) === false);
        assert(static::classImplements($result, Dispatcher::class));

        return $result;
    }
155334
public static function getRequestContextResource(string $name)
    {
        $resource = RequestContext::get('poolResource.' . $name);
        if(null === $resource)
        {
            $resource = static::getResource($name);
            RequestContext::set('poolResource.' . $name, $resource);
        }
        return $resource;
    }
487848
private function getData($context)
    {
        if (!array_key_exists($context, $this->storage)) {
            $this->storage[$context] = new FilesystemCache($this->directory . '/' . $context, self::EXTENSION);
        }

        return $this->storage[$context];
    }