API classes portage from PHP