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;
            }
        }
    }
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;
            }
        }
    }
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 ; } } }
Initializes message type.

@param array $data Message data.
Initializes message type .