public function removeAllowedType($type)
    {
        if (in_array(strtolower($type), $this->allowedTypes)) {
            unset($this->allowedTypes[array_search(strtolower($type), $this->allowedTypes)]);
        }
        return $this;
    }