Method of encapsulating silver nanodots using porous glass and its application in Q-switched all solid-state laser.