public function getGameActionSummery() { $aGameActions = $this->getGameActions(); $return = array('goals', 'assists', 'penalty_minutes'); foreach ($aGameActions as $oGameAction) { $oGameAction = new GameAction($oGameAction->getId()); $oGameActionType = $oGameAction->getGameActionType(); if ($oGameActionType->use) { if ($oGameActionType->is_goal) { $return['goals']++; } $return['penalty_minutes'] += $oGameActionType->minutes; } } $oGameActionAssists = $this->getAssists(); $return['assists'] = count($oGameActionAssists); return $return; }