PHP code example of aerisnet / fiesta-online-bundle
1. Go to this page and download the library: Download aerisnet/fiesta-online-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
public function indexAction(AccountManager $accountManager)
{
/**
* @var User $user
* returns a User instance or null by the given Account ID
*/
$user = $accountManager->getAccountById(5);
...
/**
* @var User[] $user
* returns all accounts
*/
$user = $accountManager->getAllAccounts();
...
/**
* @var User $user
* returns a User instance with all characters belonging to the account as Proxy objects
*/
$user = $accountManager->getAccountWithCharacters(5);
}
public function indexAction(CharacterManager $characterManager)
{
/**
* @var Character $character
* returns a Character instance or null by the given Character ID
*/
$character = $characterManager->getCharacterById(123);
...
/**
* @var Character $character
* returns a Character instance or null by the given Character Name
*/
$character = $characterManager->getCharacterByName('Visionaire');
...
/**
* Check if a character has an item in their inventory
* Parameters are Character ID and Item ID
*/
$hasItem = $characterManager->hasItemInInventory($character->getId(), 385782);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.