PHP Class Youshido\GraphQL\Validator\ConfigValidator\ConfigValidator

Inheritance: implements Youshido\GraphQL\Validator\ConfigValidator\ConfigValidatorInterface, use trait Youshido\GraphQL\Validator\ErrorContainer\ErrorContainerTrait
Exibir arquivo Open project: youshido/graphql Class Usage Examples

Protected Properties

Property Type Description
$extraFieldsAllowed
$instance ConfigValidator
$rules
$validationRules Youshido\GraphQL\Validator\ConfigValidator\Rules\ValidationRuleInterface[]

Public Methods

Method Description
addRule ( $name, Youshido\GraphQL\Validator\ConfigValidator\Rules\ValidationRuleInterface $rule )
assertValidConfig ( AbstractConfig $config )
getInstance ( ) : ConfigValidator
isExtraFieldsAllowed ( ) : boolean
isValid ( )
isValidConfig ( AbstractConfig $config )
setExtraFieldsAllowed ( boolean $extraFieldsAllowed ) : ConfigValidator
validate ( $data, $rules = [], $extraFieldsAllowed = null )

Protected Methods

Method Description
getConfigFinalRules ( AbstractConfig $config )
initializeRules ( )

Private Methods

Method Description
__construct ( )

Method Details

addRule() public method

public addRule ( $name, Youshido\GraphQL\Validator\ConfigValidator\Rules\ValidationRuleInterface $rule )
$rule Youshido\GraphQL\Validator\ConfigValidator\Rules\ValidationRuleInterface

assertValidConfig() public method

public assertValidConfig ( AbstractConfig $config )
$config Youshido\GraphQL\Config\AbstractConfig

getConfigFinalRules() protected method

protected getConfigFinalRules ( AbstractConfig $config )
$config Youshido\GraphQL\Config\AbstractConfig

getInstance() public static method

public static getInstance ( ) : ConfigValidator
return ConfigValidator

initializeRules() protected method

protected initializeRules ( )

isExtraFieldsAllowed() public method

public isExtraFieldsAllowed ( ) : boolean
return boolean

isValid() public method

public isValid ( )

isValidConfig() public method

public isValidConfig ( AbstractConfig $config )
$config Youshido\GraphQL\Config\AbstractConfig

setExtraFieldsAllowed() public method

public setExtraFieldsAllowed ( boolean $extraFieldsAllowed ) : ConfigValidator
$extraFieldsAllowed boolean
return ConfigValidator

validate() public method

public validate ( $data, $rules = [], $extraFieldsAllowed = null )

Property Details

$extraFieldsAllowed protected_oe property

protected $extraFieldsAllowed

$instance protected_oe static_oe property

protected static ConfigValidator,Youshido\GraphQL\Validator\ConfigValidator $instance
return ConfigValidator

$rules protected_oe property

protected $rules

$validationRules protected_oe property

protected ValidationRuleInterface[],Youshido\GraphQL\Validator\ConfigValidator\Rules $validationRules
return Youshido\GraphQL\Validator\ConfigValidator\Rules\ValidationRuleInterface[]