protected function configure(array $config)
{
if (isset($config['allow_origins'])) {
$this->setAllowOrigins($config['allow_origins']);
}
if (isset($config['allow_headers'])) {
$this->setAllowHeaders($config['allow_headers']);
}
if (isset($config['allow_methods'])) {
$this->setAllowMethods($config['allow_methods']);
}
if (isset($config['allow_credentials'])) {
$this->setAllowCredentials($config['allow_credentials']);
}
if (isset($config['expose_headers'])) {
$this->setExposeHeaders($config['expose_headers']);
}
if (isset($config['max_age'])) {
$this->setMaxAge($config['max_age']);
}
if (isset($config['origin_not_allowed'])) {
$this->setOriginNotAllowed($config['origin_not_allowed']);
}
if (isset($config['method_not_allowed'])) {
$this->setMethodNotAllowed($config['method_not_allowed']);
}
if (isset($config['header_not_allowed'])) {
$this->setHeaderNotAllowed($config['header_not_allowed']);
}
}