348 lines
8.5 KiB
YAML
348 lines
8.5 KiB
YAML
name: Factory
|
|
class_comment: null
|
|
dependencies:
|
|
- name: Closure
|
|
type: class
|
|
source: Closure
|
|
- name: Container
|
|
type: class
|
|
source: Illuminate\Contracts\Container\Container
|
|
- name: Translator
|
|
type: class
|
|
source: Illuminate\Contracts\Translation\Translator
|
|
- name: FactoryContract
|
|
type: class
|
|
source: Illuminate\Contracts\Validation\Factory
|
|
- name: Str
|
|
type: class
|
|
source: Illuminate\Support\Str
|
|
properties:
|
|
- name: translator
|
|
visibility: protected
|
|
comment: '# * The Translator implementation.
|
|
|
|
# *
|
|
|
|
# * @var \Illuminate\Contracts\Translation\Translator'
|
|
- name: verifier
|
|
visibility: protected
|
|
comment: '# * The Presence Verifier implementation.
|
|
|
|
# *
|
|
|
|
# * @var \Illuminate\Validation\PresenceVerifierInterface'
|
|
- name: container
|
|
visibility: protected
|
|
comment: '# * The IoC container instance.
|
|
|
|
# *
|
|
|
|
# * @var \Illuminate\Contracts\Container\Container|null'
|
|
- name: extensions
|
|
visibility: protected
|
|
comment: '# * All of the custom validator extensions.
|
|
|
|
# *
|
|
|
|
# * @var array<string, \Closure|string>'
|
|
- name: implicitExtensions
|
|
visibility: protected
|
|
comment: '# * All of the custom implicit validator extensions.
|
|
|
|
# *
|
|
|
|
# * @var array<string, \Closure|string>'
|
|
- name: dependentExtensions
|
|
visibility: protected
|
|
comment: '# * All of the custom dependent validator extensions.
|
|
|
|
# *
|
|
|
|
# * @var array<string, \Closure|string>'
|
|
- name: replacers
|
|
visibility: protected
|
|
comment: '# * All of the custom validator message replacers.
|
|
|
|
# *
|
|
|
|
# * @var array<string, \Closure|string>'
|
|
- name: fallbackMessages
|
|
visibility: protected
|
|
comment: '# * All of the fallback messages for custom rules.
|
|
|
|
# *
|
|
|
|
# * @var array<string, string>'
|
|
- name: excludeUnvalidatedArrayKeys
|
|
visibility: protected
|
|
comment: '# * Indicates that unvalidated array keys should be excluded, even if
|
|
the parent array was validated.
|
|
|
|
# *
|
|
|
|
# * @var bool'
|
|
- name: resolver
|
|
visibility: protected
|
|
comment: '# * The Validator resolver instance.
|
|
|
|
# *
|
|
|
|
# * @var \Closure'
|
|
methods:
|
|
- name: __construct
|
|
visibility: public
|
|
parameters:
|
|
- name: translator
|
|
- name: container
|
|
default: 'null'
|
|
comment: "# * The Translator implementation.\n# *\n# * @var \\Illuminate\\Contracts\\\
|
|
Translation\\Translator\n# */\n# protected $translator;\n# \n# /**\n# * The Presence\
|
|
\ Verifier implementation.\n# *\n# * @var \\Illuminate\\Validation\\PresenceVerifierInterface\n\
|
|
# */\n# protected $verifier;\n# \n# /**\n# * The IoC container instance.\n# *\n\
|
|
# * @var \\Illuminate\\Contracts\\Container\\Container|null\n# */\n# protected\
|
|
\ $container;\n# \n# /**\n# * All of the custom validator extensions.\n# *\n#\
|
|
\ * @var array<string, \\Closure|string>\n# */\n# protected $extensions = [];\n\
|
|
# \n# /**\n# * All of the custom implicit validator extensions.\n# *\n# * @var\
|
|
\ array<string, \\Closure|string>\n# */\n# protected $implicitExtensions = [];\n\
|
|
# \n# /**\n# * All of the custom dependent validator extensions.\n# *\n# * @var\
|
|
\ array<string, \\Closure|string>\n# */\n# protected $dependentExtensions = [];\n\
|
|
# \n# /**\n# * All of the custom validator message replacers.\n# *\n# * @var array<string,\
|
|
\ \\Closure|string>\n# */\n# protected $replacers = [];\n# \n# /**\n# * All of\
|
|
\ the fallback messages for custom rules.\n# *\n# * @var array<string, string>\n\
|
|
# */\n# protected $fallbackMessages = [];\n# \n# /**\n# * Indicates that unvalidated\
|
|
\ array keys should be excluded, even if the parent array was validated.\n# *\n\
|
|
# * @var bool\n# */\n# protected $excludeUnvalidatedArrayKeys = true;\n# \n# /**\n\
|
|
# * The Validator resolver instance.\n# *\n# * @var \\Closure\n# */\n# protected\
|
|
\ $resolver;\n# \n# /**\n# * Create a new Validator factory instance.\n# *\n#\
|
|
\ * @param \\Illuminate\\Contracts\\Translation\\Translator $translator\n# *\
|
|
\ @param \\Illuminate\\Contracts\\Container\\Container|null $container\n# *\
|
|
\ @return void"
|
|
- name: make
|
|
visibility: public
|
|
parameters:
|
|
- name: data
|
|
- name: rules
|
|
- name: messages
|
|
default: '[]'
|
|
- name: attributes
|
|
default: '[]'
|
|
comment: '# * Create a new Validator instance.
|
|
|
|
# *
|
|
|
|
# * @param array $data
|
|
|
|
# * @param array $rules
|
|
|
|
# * @param array $messages
|
|
|
|
# * @param array $attributes
|
|
|
|
# * @return \Illuminate\Validation\Validator'
|
|
- name: validate
|
|
visibility: public
|
|
parameters:
|
|
- name: data
|
|
- name: rules
|
|
- name: messages
|
|
default: '[]'
|
|
- name: attributes
|
|
default: '[]'
|
|
comment: '# * Validate the given data against the provided rules.
|
|
|
|
# *
|
|
|
|
# * @param array $data
|
|
|
|
# * @param array $rules
|
|
|
|
# * @param array $messages
|
|
|
|
# * @param array $attributes
|
|
|
|
# * @return array
|
|
|
|
# *
|
|
|
|
# * @throws \Illuminate\Validation\ValidationException'
|
|
- name: resolve
|
|
visibility: protected
|
|
parameters:
|
|
- name: data
|
|
- name: rules
|
|
- name: messages
|
|
- name: attributes
|
|
comment: '# * Resolve a new Validator instance.
|
|
|
|
# *
|
|
|
|
# * @param array $data
|
|
|
|
# * @param array $rules
|
|
|
|
# * @param array $messages
|
|
|
|
# * @param array $attributes
|
|
|
|
# * @return \Illuminate\Validation\Validator'
|
|
- name: addExtensions
|
|
visibility: protected
|
|
parameters:
|
|
- name: validator
|
|
comment: '# * Add the extensions to a validator instance.
|
|
|
|
# *
|
|
|
|
# * @param \Illuminate\Validation\Validator $validator
|
|
|
|
# * @return void'
|
|
- name: extend
|
|
visibility: public
|
|
parameters:
|
|
- name: rule
|
|
- name: extension
|
|
- name: message
|
|
default: 'null'
|
|
comment: '# * Register a custom validator extension.
|
|
|
|
# *
|
|
|
|
# * @param string $rule
|
|
|
|
# * @param \Closure|string $extension
|
|
|
|
# * @param string|null $message
|
|
|
|
# * @return void'
|
|
- name: extendImplicit
|
|
visibility: public
|
|
parameters:
|
|
- name: rule
|
|
- name: extension
|
|
- name: message
|
|
default: 'null'
|
|
comment: '# * Register a custom implicit validator extension.
|
|
|
|
# *
|
|
|
|
# * @param string $rule
|
|
|
|
# * @param \Closure|string $extension
|
|
|
|
# * @param string|null $message
|
|
|
|
# * @return void'
|
|
- name: extendDependent
|
|
visibility: public
|
|
parameters:
|
|
- name: rule
|
|
- name: extension
|
|
- name: message
|
|
default: 'null'
|
|
comment: '# * Register a custom dependent validator extension.
|
|
|
|
# *
|
|
|
|
# * @param string $rule
|
|
|
|
# * @param \Closure|string $extension
|
|
|
|
# * @param string|null $message
|
|
|
|
# * @return void'
|
|
- name: replacer
|
|
visibility: public
|
|
parameters:
|
|
- name: rule
|
|
- name: replacer
|
|
comment: '# * Register a custom validator message replacer.
|
|
|
|
# *
|
|
|
|
# * @param string $rule
|
|
|
|
# * @param \Closure|string $replacer
|
|
|
|
# * @return void'
|
|
- name: includeUnvalidatedArrayKeys
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Indicate that unvalidated array keys should be included in validated
|
|
data when the parent array is validated.
|
|
|
|
# *
|
|
|
|
# * @return void'
|
|
- name: excludeUnvalidatedArrayKeys
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Indicate that unvalidated array keys should be excluded from the validated
|
|
data, even if the parent array was validated.
|
|
|
|
# *
|
|
|
|
# * @return void'
|
|
- name: resolver
|
|
visibility: public
|
|
parameters:
|
|
- name: resolver
|
|
comment: '# * Set the Validator instance resolver.
|
|
|
|
# *
|
|
|
|
# * @param \Closure $resolver
|
|
|
|
# * @return void'
|
|
- name: getTranslator
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Get the Translator implementation.
|
|
|
|
# *
|
|
|
|
# * @return \Illuminate\Contracts\Translation\Translator'
|
|
- name: getPresenceVerifier
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Get the Presence Verifier implementation.
|
|
|
|
# *
|
|
|
|
# * @return \Illuminate\Validation\PresenceVerifierInterface'
|
|
- name: setPresenceVerifier
|
|
visibility: public
|
|
parameters:
|
|
- name: presenceVerifier
|
|
comment: '# * Set the Presence Verifier implementation.
|
|
|
|
# *
|
|
|
|
# * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
|
|
|
|
# * @return void'
|
|
- name: getContainer
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Get the container instance used by the validation factory.
|
|
|
|
# *
|
|
|
|
# * @return \Illuminate\Contracts\Container\Container|null'
|
|
- name: setContainer
|
|
visibility: public
|
|
parameters:
|
|
- name: container
|
|
comment: '# * Set the container instance used by the validation factory.
|
|
|
|
# *
|
|
|
|
# * @param \Illuminate\Contracts\Container\Container $container
|
|
|
|
# * @return $this'
|
|
traits:
|
|
- Closure
|
|
- Illuminate\Contracts\Container\Container
|
|
- Illuminate\Contracts\Translation\Translator
|
|
- Illuminate\Support\Str
|
|
interfaces:
|
|
- FactoryContract
|