Added PHP magic methods.