Get the context that applied to the failed assertion.

@return string[]
334259
public function getContext()
    {
        if ($this->context === null) {
            $this->context = array_map(
                'League\JsonGuard\as_string',
                [
                    self::KEYWORD     => $this->keyword,
                    self::PARAMETER   => $this->parameter,
                    self::DATA        => $this->data,
                    self::DATA_PATH   => $this->dataPath,
                    self::SCHEMA      => $this->schema,
                    self::SCHEMA_PATH => $this->schemaPath,
                    self::CAUSE       => $this->getCause(),
                ]
            );
        }

        return $this->context;
    }
370386
protected function getNonBreakingErrors()
    {
        $errors = [];

        $unknownRelations = $this->unknownRelationsFromRequest();
        if (count($unknownRelations) > 0) {
            $errors[] = [
                'code' => static::ERROR_UNKNOWN_LINKED_RESOURCES,
                'title' => 'Unknown included resource requested',
                'description' => 'These included resources are not available: ' . implode(', ', $unknownRelations)
            ];
        }

        return $errors;
    }
124648
protected function getContext(): array
	{
		if($this->app->isCommandLine() === false && $this->container->has(Gatekeeper::class))
		{
			$user = $this->container->get(Gatekeeper::class)->getUser();

			return ['user_id' => $user !== null ? $user->getId() : null];
		}

		return [];
	}
827104
final protected function getContext() : array
    {
        $context = [
            'request' => empty($this->contexts['request']) ? $this->generateRequest() : $this->contexts['request']
        ];

        // Add User Context
        if (empty($this->contexts['user']) === false) {
            $context['user'] = $this->contexts['user'];
        }

        // Add Custom Context
        if (empty($this->contexts['custom']) === false) {
            $context['custom'] = $this->contexts['custom'];
        }

        // Add Tags Context
        if (empty($this->contexts['tags']) === false) {
            $context['tags'] = $this->contexts['tags'];
        }

        return $context;
    }
1103415
public function getReceptionCodes()
    {
        $rcLib = $this->util->getReceptionCodeLibrary();

        if ($this->unDelete) {
            return $rcLib->getRespondentRestoreCodes();
        }
        return $rcLib->getRespondentDeletionCodes();
    }
768650
public function getValidationErrors()
    {
        $fields = $this->getFields();
        if (!$fields) {
            return [];
        }

        $result = [];
        foreach ($fields as $field) {
            if ($field instanceof AbstractFormField) {
                if (!$field->isValid()) {
                    $result = array_merge($result, $field->getErrorMessages());
                }
            }
        }

        return $result;
    }
1054198
public function getContext()
    {
        if (!isset($this->context)) {
            $request = $this->container->get('request');

            $this->context = new RequestContext();
            $this->context->fromRequest($request);
        }

        return $this->context;
    }
201653
public function getError() {
        return (object) [
            "code"    => $this->getCode(),
            "message" => $this->getMessage(),
            "details" => $this->getDetails(),
            "key"     => $this->getKey()
        ];
    }
1214103
public function get_context() {
        if ($this->coursecontext === null) {
            $this->coursecontext = \context_course::instance($this->course->id);
        }
        return $this->coursecontext;
    }
1287930
public function getSecurityContexts()
    {
        $contexts = [];
        $this->iterateAdmins(function(Admin $admin) use (&$contexts) {
            $contexts = array_merge_recursive($contexts, $admin->getSecurityContexts());
        });

        return $contexts;
    }
355101
public function getExceptionMessages()
    {
        $messages = array();
        foreach( $this->__get('exceptionsFlat') as $exception ) {
            $messages[] = $exception->getMessage();
        }
        return $messages;
    }
1192400
public function getInvalidErrors()
    {
        return array_combine(
            array_keys($this->invalidAttribs),
            array_map(function ($ref) {
                return $ref['error'];
            }, array_values($this->invalidAttribs))
        );
    }
1163715
public synchronized List<FailedContext> getFailedContextsForEvaluatorFailure() {
    final List<FailedContext> failedContextList = new ArrayList<>();
    final List<EvaluatorContext> activeContexts = new ArrayList<>(this.contextStack);
    Collections.reverse(activeContexts);

    for (final EvaluatorContext context : activeContexts) {
      failedContextList.add(context.getFailedContextForEvaluatorFailure());
    }
    return failedContextList;
  }
1272684
public function getContext()
    {
        if (empty($this->context)) {
            return;
        }

        array_unshift($this->context, "<?php \$context = array(); \n");
        $this->context[] = "return \$context;";
        $context = implode(null, $this->context);

        // Erases context to make sure the next template context won't append to
        $this->context = null;

        return eval('?>' . $context);
    }
1158790
private function getExceptionScenarios() {
    $scenarios = [];
    $api_wrapper_interface = class_implements($this->apiWrapper);
    if ($api_wrapper_interface) {
      $scenarios = get_class_methods(array_shift($api_wrapper_interface));
    }
    return $scenarios;
  }
170660
public function getExceptions(): array
    {
        $memory = $this->getMemory();

        $exceptions = $this->unserialize($memory);

        shmop_write($memory, serialize([]), 0);

        shmop_close($memory);

        return $exceptions;
    }
394467
private function parseContext($context)
    {
        $debugBackTrace = debug_backtrace();
        if(!isset($context['trace']))
        {
            $context['trace'] = $this->getTrace($debugBackTrace);
        }
        if(!isset($context['errorFile']))
        {
            list($file, $line) = $this->getErrorFile($debugBackTrace);
            $context['errorFile'] = $file;
            $context['errorLine'] = $line;
        }
        return $context;
    }