Lines Matching defs:generator
26 * @var GeneratorInterface $generator Random Btyes Generator
28 protected $generator;
35 * @param GeneratorInterface $generator
37 public function __construct($size = 21, GeneratorInterface $generator = null)
40 $this->generator = $generator?:new Generator();
57 return $this->core->random($this->generator, $size, $this->alphbet);
66 * Otherwise use the build-in default random bytes generator
68 * @param GeneratorInterface $generator
73 public function formattedId($alphabet, $size = 0, GeneratorInterface $generator = null)
77 $generator = $generator?:$this->generator;
79 return $this->core->random($generator, $size, $alphabet);
87 * @param GeneratorInterface $generator
92 public function formatedId($alphabet, $size = 0, GeneratorInterface $generator = null)
96 return $this->formattedId($alphabet, $size, $generator);