public function set_type($type = self::TYPE_INFO) {
        if (in_array($type, array(self::TYPE_OK, self::TYPE_ERROR, self::TYPE_INFO))) {
            $this->type = $type;
        } else {
            throw new coding_exception('Unknown message type.');
        }
    }
public function set_type($type = self::TYPE_INFO) {
        if (in_array($type, array(self::TYPE_OK, self::TYPE_ERROR, self::TYPE_INFO))) {
            $this->type = $type;
        } else {
            throw new coding_exception('Unknown message type.');
        }
    }
public function set_type ( $ type = self :: TYPE_INFO ) { if ( in_array ( $ type , array ( self :: TYPE_OK , self :: TYPE_ERROR , self :: TYPE_INFO ) ) ) { $ this -> type = $ type ; } else { throw new coding_exception ( 'Unknown message type.' ) ; } }
Sets the message type

@param int $type
Sets the message type