__construct()
Create a new validator instance.
public
__construct(RepositoryInterface $repository, array<string|int, string> $variables) : void
Parameters
-
$repository
: RepositoryInterface
-
-
$variables
: array<string|int, string>
-
-
throws
-
ValidationException
allowedRegexValues()
Assert that each variable matches the given regular expression.
public
allowedRegexValues(string $regex) : Validator
Parameters
-
$regex
: string
-
-
throws
-
ValidationException
allowedValues()
Assert that each variable is amongst the given choices.
public
allowedValues(array<string|int, string> $choices) : Validator
Parameters
-
$choices
: array<string|int, string>
-
-
throws
-
ValidationException
assert()
Assert that the callback returns true for each variable.
public
assert(
Warning: Array to string conversion in phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 64
Call Stack:
0.0638 27947728 1. {main}() C:\wamp64V2\bin\php\php8.2.13\ext\phpDocumentor.phar:0
0.0695 27950176 2. require('phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/bin/phpdoc') C:\wamp64V2\bin\php\php8.2.13\ext\phpDocumentor.phar:11
0.1005 29739704 3. Symfony\Component\Console\Application->run($input = ???, $output = ???) phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/bin/phpdoc:13
0.3079 30077640 4. phpDocumentor\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { protected $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 0; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = class Symfony\Component\Console\Input\InputArgument { ... }; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected $options = ['ansi' => TRUE, 'directory' => [...], 'target' => 'C:/mediatekdocuments_documentation', 'title' => 'rest_mediatekdocuments']; protected $arguments = ['command' => 'run']; protected $interactive = TRUE; private array $tokens = [0 => 'run', 1 => '--ansi', 2 => '--directory', 3 => 'C:/wamp64V2/www/rest_mediatekdocuments', 4 => '--target', 5 => 'C:/mediatekdocuments_documentation', 6 => '--title', 7 => 'rest_mediatekdocuments']; private array $parsed = [] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/vendor/symfony/console/Application.php:175
10.1768 55316152 5. Symfony\Component\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { protected $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 0; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = class Symfony\Component\Console\Input\InputArgument { ... }; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected $options = ['ansi' => TRUE, 'directory' => [...], 'target' => 'C:/mediatekdocuments_documentation', 'title' => 'rest_mediatekdocuments']; protected $arguments = ['command' => 'run']; protected $interactive = TRUE; private array $tokens = [0 => 'run', 1 => '--ansi', 2 => '--directory', 3 => 'C:/wamp64V2/www/rest_mediatekdocuments', 4 => '--target', 5 => 'C:/mediatekdocuments_documentation', 6 => '--title', 7 => 'rest_mediatekdocuments']; private array $parsed = [] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/src/phpDocumentor/Console/Application.php:78
10.1780 55323160 6. Symfony\Component\Console\Application->doRunCommand($command = class phpDocumentor\Console\Command\Project\RunCommand { private ?Symfony\Component\Console\Application ${Symfony\Component\Console\Command\Command}application = class phpDocumentor\Console\Application { private array ${Symfony\Component\Console\Application}commands = [...]; private bool ${Symfony\Component\Console\Application}wantHelps = FALSE; private ?Symfony\Component\Console\Command\Command ${Symfony\Component\Console\Application}runningCommand = ...; private string ${Symfony\Component\Console\Application}name = 'phpDocumentor'; private string ${Symfony\Component\Console\Application}version = '3.6.0'; private ?Symfony\Component\Console\CommandLoader\CommandLoaderInterface ${Symfony\Component\Console\Application}commandLoader = NULL; private bool ${Symfony\Component\Console\Application}catchExceptions = TRUE; private bool ${Symfony\Component\Console\Application}catchErrors = FALSE; private bool ${Symfony\Component\Console\Application}autoExit = TRUE; private Symfony\Component\Console\Input\InputDefinition ${Symfony\Component\Console\Application}definition = class Symfony\Component\Console\Input\InputDefinition { ... }; private Symfony\Component\Console\Helper\HelperSet ${Symfony\Component\Console\Application}helperSet = class Symfony\Component\Console\Helper\HelperSet { ... }; private ?Symfony\Contracts\EventDispatcher\EventDispatcherInterface ${Symfony\Component\Console\Application}dispatcher = class Symfony\Component\EventDispatcher\EventDispatcher { ... }; private Symfony\Component\Console\Terminal ${Symfony\Component\Console\Application}terminal = class Symfony\Component\Console\Terminal { ... }; private string ${Symfony\Component\Console\Application}defaultCommand = 'project:run'; private bool ${Symfony\Component\Console\Application}singleCommand = FALSE; private bool ${Symfony\Component\Console\Application}initialized = TRUE; private ?Symfony\Component\Console\SignalRegistry\SignalRegistry ${Symfony\Component\Console\Application}signalRegistry = NULL; private array ${Symfony\Component\Console\Application}signalsToDispatchEvent = [...] }; private ?string ${Symfony\Component\Console\Command\Command}name = 'project:run'; private ?string ${Symfony\Component\Console\Command\Command}processTitle = NULL; private array ${Symfony\Component\Console\Command\Command}aliases = [0 => 'run']; private Symfony\Component\Console\Input\InputDefinition ${Symfony\Component\Console\Command\Command}definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 0; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; private bool ${Symfony\Component\Console\Command\Command}hidden = FALSE; private string ${Symfony\Component\Console\Command\Command}help = ' phpDocumentor creates documentation from PHP source files. The simplest way\n to use it is:\n\n $ phpdoc run -d [directory to parse] -t [output directory]\n\n This will parse every file ending with .php in and then output a HTML site containing easily readable documentation\n in $callback, string $message) : Validator
Parameters
-
$callback
:
Warning: Array to string conversion in phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/src/phpDocumentor/Transformer/Writer/Twig/LinkRenderer/CallableAdapter.php on line 64
Call Stack:
0.0638 27947728 1. {main}() C:\wamp64V2\bin\php\php8.2.13\ext\phpDocumentor.phar:0
0.0695 27950176 2. require('phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/bin/phpdoc') C:\wamp64V2\bin\php\php8.2.13\ext\phpDocumentor.phar:11
0.1005 29739704 3. Symfony\Component\Console\Application->run($input = ???, $output = ???) phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/bin/phpdoc:13
0.3079 30077640 4. phpDocumentor\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { protected $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 0; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = class Symfony\Component\Console\Input\InputArgument { ... }; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected $options = ['ansi' => TRUE, 'directory' => [...], 'target' => 'C:/mediatekdocuments_documentation', 'title' => 'rest_mediatekdocuments']; protected $arguments = ['command' => 'run']; protected $interactive = TRUE; private array $tokens = [0 => 'run', 1 => '--ansi', 2 => '--directory', 3 => 'C:/wamp64V2/www/rest_mediatekdocuments', 4 => '--target', 5 => 'C:/mediatekdocuments_documentation', 6 => '--title', 7 => 'rest_mediatekdocuments']; private array $parsed = [] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/vendor/symfony/console/Application.php:175
10.1768 55316152 5. Symfony\Component\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { protected $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 0; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = class Symfony\Component\Console\Input\InputArgument { ... }; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected $options = ['ansi' => TRUE, 'directory' => [...], 'target' => 'C:/mediatekdocuments_documentation', 'title' => 'rest_mediatekdocuments']; protected $arguments = ['command' => 'run']; protected $interactive = TRUE; private array $tokens = [0 => 'run', 1 => '--ansi', 2 => '--directory', 3 => 'C:/wamp64V2/www/rest_mediatekdocuments', 4 => '--target', 5 => 'C:/mediatekdocuments_documentation', 6 => '--title', 7 => 'rest_mediatekdocuments']; private array $parsed = [] }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... }; private $stream = resource(3) of type (stream) }; private array $consoleSectionOutputs = [] }) phar://C:/wamp64V2/bin/php/php8.2.13/ext/phpDocumentor.phar/src/phpDocumentor/Console/Application.php:78
10.1780 55323160 6. Symfony\Component\Console\Application->doRunCommand($command = class phpDocumentor\Console\Command\Project\RunCommand { private ?Symfony\Component\Console\Application ${Symfony\Component\Console\Command\Command}application = class phpDocumentor\Console\Application { private array ${Symfony\Component\Console\Application}commands = [...]; private bool ${Symfony\Component\Console\Application}wantHelps = FALSE; private ?Symfony\Component\Console\Command\Command ${Symfony\Component\Console\Application}runningCommand = ...; private string ${Symfony\Component\Console\Application}name = 'phpDocumentor'; private string ${Symfony\Component\Console\Application}version = '3.6.0'; private ?Symfony\Component\Console\CommandLoader\CommandLoaderInterface ${Symfony\Component\Console\Application}commandLoader = NULL; private bool ${Symfony\Component\Console\Application}catchExceptions = TRUE; private bool ${Symfony\Component\Console\Application}catchErrors = FALSE; private bool ${Symfony\Component\Console\Application}autoExit = TRUE; private Symfony\Component\Console\Input\InputDefinition ${Symfony\Component\Console\Application}definition = class Symfony\Component\Console\Input\InputDefinition { ... }; private Symfony\Component\Console\Helper\HelperSet ${Symfony\Component\Console\Application}helperSet = class Symfony\Component\Console\Helper\HelperSet { ... }; private ?Symfony\Contracts\EventDispatcher\EventDispatcherInterface ${Symfony\Component\Console\Application}dispatcher = class Symfony\Component\EventDispatcher\EventDispatcher { ... }; private Symfony\Component\Console\Terminal ${Symfony\Component\Console\Application}terminal = class Symfony\Component\Console\Terminal { ... }; private string ${Symfony\Component\Console\Application}defaultCommand = 'project:run'; private bool ${Symfony\Component\Console\Application}singleCommand = FALSE; private bool ${Symfony\Component\Console\Application}initialized = TRUE; private ?Symfony\Component\Console\SignalRegistry\SignalRegistry ${Symfony\Component\Console\Application}signalRegistry = NULL; private array ${Symfony\Component\Console\Application}signalsToDispatchEvent = [...] }; private ?string ${Symfony\Component\Console\Command\Command}name = 'project:run'; private ?string ${Symfony\Component\Console\Command\Command}processTitle = NULL; private array ${Symfony\Component\Console\Command\Command}aliases = [0 => 'run']; private Symfony\Component\Console\Input\InputDefinition ${Symfony\Component\Console\Command\Command}definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 0; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; private bool ${Symfony\Component\Console\Command\Command}hidden = FALSE; private string ${Symfony\Component\Console\Command\Command}help = ' phpDocumentor creates documentation from PHP source files. The simplest way\n to use it is:\n\n $ phpdoc run -d [directory to parse] -t [output directory]\n\n This will parse every file ending with .php in and then output a HTML site containing easily readable documentation\n in
-
-
$message
: string
-
-
throws
-
ValidationException
assertNullable()
Assert that the callback returns true for each variable.
public
assertNullable(callable(string): bool $callback, string $message) : Validator
Skip checking null variable values.
Parameters
-
$callback
: callable(string): bool
-
-
$message
: string
-
-
throws
-
ValidationException
isBoolean()
Assert that each specified variable is a boolean.
public
isBoolean() : Validator
-
throws
-
ValidationException
isInteger()
Assert that each specified variable is an integer.
public
isInteger() : Validator
-
throws
-
ValidationException
notEmpty()
Assert that each variable is not empty.
public
notEmpty() : Validator
-
throws
-
ValidationException
required()
Assert that each variable is present.
public
required() : Validator
-
throws
-
ValidationException