Code :
$doProcess = new doProcess();
$match = $doProcess->fetchMatchDetailsById(1455138);
f($match){
$players = $match->getPlayers();
echo $players[9]->getAccount_id() ;
echo $players[9]->getHero()->getName();
$player = $players[9] ;
// echo $players[9]->getAccount()->getSteamid();
echo $player->getAccount()->getSteamid();
echo $player->getAccount()->getPersonaname();
}
but how :
line 1 : $doProcess = new doProcess(); makes a doProcess object to handle our requests .
line 2 : ask process system to find and grab match from dota 2 server .
line 3 : if there were a match then get it informations .
$players = $match->getPlayers();
get players from match it indexed from 0 - 9 and it 's array object
you can use foreach or some thing like $players[9] to get it contents , 2 objects attach to player
- hero
- account
hero just have 2 methods getId() and getName() for now but account have more methods depends on your Public/Private request you are selected on confing file .
for more information on match object method see : full match details object methods