refactor(php) Split prepare and load into two methods