mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 13:06:22 +00:00
349 B
349 B
id | title |
---|---|
f3eefc1b-34f9-41e8-a22b-33e87f94c29a | define() |
Syntax
// Before
$resolver->setRequired('host');
$resolver->setDefaults(['host' => 'smtp.example.org']);
$resolver->setAllowedTypes('host', 'string');
// After
$resolver->define('host')
->required()
->default('smtp.example.org')
->allowedTypes('string');