Retrieve Bad Player Stats

@access public
@return object JSON
1831
public function retrieveBadPlayerStats ()
    {
        $data = file_get_contents("http://battlefield.play4free.com/en/profile/stats/" .$this->_profileID. "/" .$this->_soldierID. "?g=[%22BadPlayerStats%22]");
        $badPlayerStats = json_decode($data);
        return $badPlayerStats;
    }
489707
public function retrieveVehicleStats ()
    {
        $data = file_get_contents("http://battlefield.play4free.com/en/profile/stats/" .$this->_profileID. "/" .$this->_soldierID. "?g=[%22VehicleStats%22]");
        $vehicleStats = json_decode($data);
        return $vehicleStats;
    }
1257772
public function getStats()
    {
        $this->stats = array(
            'tooSlow'        => 0,
            'slowAcceptable' => 0,
            'aBitSlow'       => 0,
            'goodSlow'       => 0,
            'perfect'        => 0,
            'goodFast'       => 0,
            'aBitFast'       => 0,
            'fastAcceptable' => 0,
            'tooFast'        => 0
        );

        $cuesCount = $this->getCuesCount();
        for ($i = 0; $i < $cuesCount; $i++) {
            $rs = $this->getCue($i)->getReadingSpeed();

            if ($rs < 5) {
                $this->stats['tooSlow']++;
            } elseif ($rs < 10) {
                $this->stats['slowAcceptable']++;
            } elseif ($rs < 13) {
                $this->stats['aBitSlow']++;
            } elseif ($rs < 15) {
                $this->stats['goodSlow']++;
            } elseif ($rs < 23) {
                $this->stats['perfect']++;
            } elseif ($rs < 27) {
                $this->stats['goodFast']++;
            } elseif ($rs < 31) {
                $this->stats['aBitFast']++;
            } elseif ($rs < 35) {
                $this->stats['fastAcceptable']++;
            } else {
                $this->stats['tooFast']++;
            }
        }

        return $this->stats;
    }
938352
public function getPOV()
    {
        foreach ($this->owner->players as $player) {
            if ($player->owner) {
                return $player->name;
            }
        }
        return '';
    }
466535
function currentUserHasRated()
    {
        $rateDataObj = ezsrRatingDataObject::create( array( 'contentobject_id' => $this->attribute('contentobject_id'),
                                                            'contentobject_attribute_id' =>  $this->attribute('contentobject_attribute_id'),
                                                            'created_at' => 0 ) );
        return $rateDataObj->userHasRated();
    }
1371117
public function retrieveRushMapStats () 
    {
        $data = file_get_contents("http://battlefield.play4free.com/en/profile/stats/" .$this->_profileID. "/" .$this->_soldierID. "?g=[%22RushMapStats%22]&_?=1351945928776");
        $rushMapStats = json_decode($data);
        return $rushMapStats;
    }
381771
public function outputJSON()
    {
        if (count($this->data) > 1 && $this->outputMode == self::MODE_SINGLE) {
            throw new \Exception('multiple records returned, but output-mode is single?');
        }
        return $this->formatJSON();
    }
1307735
public function getJson()
    {
        $body = $this->getBody();
        $json = json_decode($body, true);

        if (!is_array($json)) {
            if ($this->_wasAsync) {
                return [];
            }

            // should be an array, fail otherwise
            throw new ClientException('Got a malformed result from the server');
        }

        return $json;
    }
647597
static function stats( $ContentObjectID )
    {
        static $cachedStats = array( 0 => null );
        if ( isset( $cachedStats[$ContentObjectID] ) )
        {
            return $cachedStats[$ContentObjectID];
        }
        else
        {
            $custom = array( array( 'operation' => 'sum( rating_count )',
                                    'name'      => 'rating_count' ) ,
                             array( 'operation' => 'avg( rating_average )',
                                    'name'      => 'rating_average' ) );
            $cond = array( 'contentobject_id' => $ContentObjectID );
            $return = self::fetchObjectList( self::definition(), array() ,$cond, null, null, false, false, $custom );

            if ( isset( $return[0]['rating_count'] ) )
                $return = $return[0];

            $cachedStats[$ContentObjectID] = $return;
        }
        return $return;
    }
1348847
public function getJsonObject()
    {
        // array_filter() ensures that empty values are filtered out
        // array_values() ensures encoding to array rather than object
        $this->sslRoutingRestrictedUrls     = array_values(array_filter($this->sslRoutingRestrictedUrls));
        $this->maintenanceModeAuthorizedIps = array_values(array_filter($this->maintenanceModeAuthorizedIps));

        return json_encode(get_object_vars($this));
    }
1287048
public function playerStat($playerStatId)
	{
		if ( ! isset($this->info['playerStatSummaries'][$playerStatId]))
		{
			return null;
		}

		return $this->info['playerStatSummaries'][$playerStatId];
	}
276696
def get_json(self):
        """"""
        ratings_dict = {
            'category': self.category,
            'date': self.date,
            'day': self.weekday,
            'next week': self.next_week,
            'last week': self.last_week,
            'entries': self.entries,
            'url': self.url
        }
        return to_json(ratings_dict)
763699
public function getJSONObject(){
        $result = false;
        $responseHandler = new ResponseHandler();
        if(is_array($this->_lastResponse)){
            $result = $responseHandler->arrayToObject($this->_lastResponse['body']);
        }
        return $result;
    }
660760
protected function getJson()
    {
        if ($this->str_request_body_json === null) {
            $this->str_request_body_json = json_decode($this->getBody());
        }
        return $this->str_request_body_json;
    }
700190
def ladderPlayerInfo(cfg, playerName, getMatchHistory=False):
    """"""
    payload = json.dumps([playerName, getMatchHistory]) # if playerName == None, info on all players is retrieved
    ladder = cfg.ladder
    return requests.post(
        url  = c.URL_BASE%(ladder.ipAddress, ladder.serverPort, "playerstats"),
        data = payload,
        #headers=headers,
    )
39868
public function getData()
    {
        $data = [];

        $problems = $this->fetcher->fetch();

        $allowedSeverities = [
            Problem::SEVERITY_CRITICAL,
            Problem::SEVERITY_WARNING,
        ];

        foreach ($problems as $problem) {
            if (!in_array($problem->getSeverity(), $allowedSeverities)) {
                continue;
            }

            $data[] = [
                'id' => strlen($problem->getId()) ? $problem->getId() : md5(serialize($problem)),
                'iconCls' => $problem->getIconClass(),
                'severity' => $problem->getSeverity(),
                'msg' => $problem->getMessage(),
                'hint' => $problem->getHint(),
                'link' => $problem->getLink(),
            ];
        }

        if (!count($data)) {
            $data = false;
        }

        return $data;
    }
716365
public function toJSON()
    {
        $result = [
            'Status' => $this->Status(),
            'ShouldPass' => $this->ShouldPass(),
            'Checks' => []
        ];
        foreach ($this->details as $detail) {
            $result['Checks'][] = $detail->toMap();
        }
        return json_encode($result);
    }