You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generates a secure random string using [ircmaxell's RandomLib](https://github.com/ircmaxell/RandomLib). The library provides three different strengths of
56
+
strings(currently `high` is unavailable), `low` and `medium`. Defaults:
@@ -133,3 +153,43 @@ However, by setting `override` to false, only null properties will have a string
133
153
```php
134
154
@Generate(generator="string", override=false)
135
155
```
156
+
157
+
158
+
## Custom generators
159
+
You can use your own generators by implementing `GeneratorInterface` and defining the generator in the configuration,
160
+
using either its service or classname.
161
+
162
+
To create configurable generators, implement `ConfigurableGeneratorInterface`. This interface uses
163
+
[`Symfony\Component\OptionsResolver\OptionsResolver`](http://symfony.com/doc/current/components/options_resolver.html) to set the generator configuration.
164
+
165
+
Set default options:
166
+
167
+
```php
168
+
/**
169
+
* @param OptionsResolver $resolver
170
+
* @return mixed
171
+
*/
172
+
public function getDefaultOptions(OptionsResolver $resolver)
0 commit comments