private function initializeType(array $data)
    {
        if (isset($data['type']) === false) {
            return;
        }

        if ($data['type'] === 'error') {
            $this->type = self::TYPE_ERROR;
        } elseif ($data['type'] === 'info') {
            if (isset($data['subType']) === true &&
                $data['subType'] === 'warning'
            ) {
                $this->type = self::TYPE_WARNING;
            } else {
                $this->type = self::TYPE_INFO;
            }
        }
    }