public function initialize($type)
{
$type = (string) $type;
// check if this is a valid type
if (!in_array($type, $this->allowedTypes)) {
throw new InvalidInitTypeException($type, $this->allowedTypes);
}
// set type
$this->type = $type;
// set a default timezone if no one was set by PHP.ini
if (ini_get('date.timezone') == '') {
date_default_timezone_set('Europe/Brussels');
}
\SpoonFilter::disableMagicQuotes();
$this->initSession();
}