PHP Class LeagueWrap\StaticOptimizer

Show file Open project: paquettg/leaguewrap Class Usage Examples

Protected Properties

Property Type Description
$fields Holds all the raw field data to be used to get the correct data from any given hash.
$requests Stores the groups of requests that are grouped by static source.
$results Keep the results from the requests in $requests.

Public Methods

Method Description
getDataFromHash ( string $hash ) : array Gets the result data array from the static api by the given hash.
optimizeFields ( array $fields ) Takes all the fields and optimizes them in the $requests array.
setStaticInfo ( Staticdata $staticData ) : void Uses the static api to get all the static information we need that have already been optimized.

Method Details

getDataFromHash() public method

Gets the result data array from the static api by the given hash.
public getDataFromHash ( string $hash ) : array
$hash string
return array

optimizeFields() public method

Takes all the fields and optimizes them in the $requests array.
public optimizeFields ( array $fields )
$fields array

setStaticInfo() public method

Uses the static api to get all the static information we need that have already been optimized.
public setStaticInfo ( Staticdata $staticData ) : void
$staticData LeagueWrap\Api\Staticdata
return void

Property Details

$fields protected property

Holds all the raw field data to be used to get the correct data from any given hash.
protected $fields

$requests protected property

Stores the groups of requests that are grouped by static source.
protected $requests

$results protected property

Keep the results from the requests in $requests.
protected $results