add get functions.

edited from GitHub.com
Merge pull request #1 from phpla/master

add get functions. OK by ptgn