public function __construct($enabled = true, $allowedMethods = []) { $this->setEnabled($enabled); if (!empty($allowedMethods)) { $this->setAllowedMethods($allowedMethods); } }