Kshabazz\BattleNet\D3\Connections\Sql¶
- class Sql¶
Class Sql
- __construct($pBattleNetId, PDO $pPdo, $pIpAddress = NULL)¶
Constructor
Parameters: - $pBattleNetId (string) –
- $pPdo (PDO) –
- $pIpAddress (string) –
- addRequest($pUrl)¶
Add a record of the Battle.net Web API request.
Parameters: - $pUrl (string) – The Battle.net url web API URL requested.
Returns: bool|mixed
- getHero($pHeroId)¶
Get hero data from local database.
Parameters: - $pHeroId (int) –
Returns: string|null
- getItem($pItemHash)¶
Get item JSON data from local database.
Parameters: - $pItemHash (string) –
Returns: string|null
- getItemsAsModels($pItemHashes)¶
Parameters: - $pItemHashes –
- getProfile()¶
Get the profile from local database.
Returns: string|null
- saveHero($pHeroId, $pJson)¶
Save the hero in a local database.
Parameters: - $pHeroId –
- $pJson –
Returns: bool Indicates success (TRUE) or failure (FALSE).
- saveItem(Item $pItem, $shaString)¶
Save the item locally in a database.
Parameters: - $pItem (Item) –
- $shaString (string) – A unique string to use as a SHA seed for the item SHA value in the database.
Returns: bool
- saveProfile($pJson)¶
Save the users profile locally to the database.
Parameters: - $pJson (string) –
Returns: bool