ICanBoogie
  • Documentation
  • API Reference
  • Validate master
Namespaces
  • ICanBoogie
    • Validate
      • Reader
      • Validation
      • Validator
      • ValidatorProvider
Classes
  • Context
  • Message
  • Render
  • Validation
  • ValidationErrors
Interfaces
  • Reader
  • Validator
  • ValidatorOptions
  • ValidatorProvider
Exceptions
  • ParameterIsMissing
  • ValidationFailed

Class Context

Representation of a validation context.

Namespace: ICanBoogie\Validate
Located at Context.php

Methods summary

public value( string $name ) : mixed|null

Retrieves a value from the reader adapter.

Retrieves a value from the reader adapter.

Parameters

$name

Returns

mixed|null
The value, or null if it is not defined.
public param( string $name ) : mixed

Retrieves a parameter from the validator parameters.

Retrieves a parameter from the validator parameters.

Parameters

$name

Returns

mixed

Throws

ICanBoogie\Validate\ParameterIsMissing
if the parameter is not set.
public option( string $name, mixed|null $default = null ) : mixed|null

Retrieves an option from the validator parameters.

Retrieves an option from the validator parameters.

Parameters

$name
$default

Returns

mixed|null
The option value or null if it is not defined.

Properties summary

public $attribute : string

The attribute being validated.

The attribute being validated.


		
public $value : mixed

The value of the attribute being validated.

The value of the attribute being validated.


		
public $reader : ICanBoogie\Validate\Reader

A reader adapter.

A reader adapter.


		
public $validator : ICanBoogie\Validate\Validator

The current validator.

The current validator.


		
public $validator_params : array

The validator parameters.

The validator parameters.

[]
public $message : string

The possible error message for the current validator.

The possible error message for the current validator.


		
public $message_args : array

The arguments for the possible error message.

The arguments for the possible error message.

[]
public $errors : Message[][]

The collected errors.

The collected errors.

[]
Validate master – Check on GitHub – API documentation generated by ApiGen