added PHP magic methods for getting and setting