PHP 8.3.31
Preview: Context.php Size: 1.04 KB
//proc/thread-self/root/home/getspomw/itechservicellc.com/vendor/nette/schema/src/Schema/Context.php

<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */

declare(strict_types=1);

namespace Nette\Schema;


final class Context
{
	public bool $skipDefaults = false;

	/** @var string[] */
	public array $path = [];

	public bool $isKey = false;

	/** @var Message[] */
	public array $errors = [];

	/** @var Message[] */
	public array $warnings = [];

	/** @var array[] */
	public array $dynamics = [];


	public function addError(string $message, string $code, array $variables = []): Message
	{
		$variables['isKey'] = $this->isKey;
		return $this->errors[] = new Message($message, $code, $this->path, $variables);
	}


	public function addWarning(string $message, string $code, array $variables = []): Message
	{
		return $this->warnings[] = new Message($message, $code, $this->path, $variables);
	}


	/** @return \Closure(): bool */
	public function createChecker(): \Closure
	{
		$count = count($this->errors);
		return fn(): bool => $count === count($this->errors);
	}
}

Directory Contents

Dirs: 1 × Files: 8

Name Size Perms Modified Actions
Elements DIR
- drwxr-xr-x 2025-11-18 19:24:02
Edit Download
1.04 KB lrw-r--r-- 2025-10-28 20:23:02
Edit Download
222 B lrw-r--r-- 2025-10-28 20:23:02
Edit Download
2.70 KB lrw-r--r-- 2025-10-28 20:23:02
Edit Download
4.86 KB lrw-r--r-- 2025-10-28 20:23:02
Edit Download
2.68 KB lrw-r--r-- 2025-10-28 20:23:02
Edit Download
1.90 KB lrw-r--r-- 2025-10-28 20:23:02
Edit Download
586 B lrw-r--r-- 2025-10-28 20:23:02
Edit Download
855 B lrw-r--r-- 2025-10-28 20:23:02
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).