- function __construct(RouterInterface $router, SluggerUtil $slugger, string $cache = '../var/cache', string $path = './bundles/rapsyspack', string $prefix = 'image', string $captchaBackground = self::captchaBackground, string $captchaFill = self::captchaFill, int $captchaFontSize = self::captchaFontSize, string $captchaStroke = self::captchaStroke, int $captchaStrokeWidth = self::captchaStrokeWidth) {
- //Set cache
- $this->cache = $cache.'/'.$prefix;
-
- //Set captcha background
- $this->captchaBackground = $captchaBackground;
-
- //Set captcha fill
- $this->captchaFill = $captchaFill;
-
- //Set captcha font size
- $this->captchaFontSize = $captchaFontSize;
-
- //Set captcha stroke
- $this->captchaStroke = $captchaStroke;
-
- //Set captcha stroke width
- $this->captchaStrokeWidth = $captchaStrokeWidth;
-
- //Set path
- $this->path = $path.'/'.$prefix;
-
- //Set router
- $this->router = $router;
-
- //Set slugger
- $this->slugger = $slugger;
+ function __construct(protected RouterInterface $router, protected SluggerUtil $slugger, protected string $cache = '../var/cache', protected string $path = './bundles/rapsyspack', protected string $prefix = 'image', protected string $background = self::background, protected string $fill = self::fill, protected int $fontSize = self::fontSize, protected string $stroke = self::stroke, protected int $strokeWidth = self::strokeWidth) {