PHP Class GraphQL\Type\Definition\Config

Afficher le fichier Open project: webonyx/graphql-php Class Usage Examples

Méthodes publiques

Méthode Description
arrayOf ( array | integer $definition, integer $flags ) : stdClass
disableValidation ( ) Disables config validation
enableValidation ( $allowCustomOptions = true ) Enable deep config validation (disabled by default because it creates significant performance overhead).
map ( array $definition, integer $flags ) : stdClass
validate ( array $config, array $definition )
validateField ( $typeName, array $config, array $definition )

Private Methods

Méthode Description
getFlags ( $def ) : mixed
validateEntry ( $typeName, $key, $value, $def, $pathStr )
validateMap ( $typeName, array $map, array $definitions, null $pathStr = null )

Method Details

arrayOf() public static méthode

public static arrayOf ( array | integer $definition, integer $flags ) : stdClass
$definition array | integer
$flags integer
Résultat stdClass

disableValidation() public static méthode

Disables config validation
public static disableValidation ( )

enableValidation() public static méthode

Useful only at development to catch type definition errors quickly.
public static enableValidation ( $allowCustomOptions = true )

map() public static méthode

public static map ( array $definition, integer $flags ) : stdClass
$definition array
$flags integer
Résultat stdClass

validate() public static méthode

public static validate ( array $config, array $definition )
$config array
$definition array

validateField() public static méthode

public static validateField ( $typeName, array $config, array $definition )
$typeName
$config array
$definition array