PHP Class Pheal\Pheal

显示文件 Open project: 3rdpartyeve/phealng Class Usage Examples

Public Properties

Property Type Description
$scope string ..)
$xml String Result of the last XML request, so application can use the raw xml data

Public Methods

Method Description
__call ( String $name, array $arguments ) : Pheal\Core\Result Magic __call method, will translate all function calls to object to API requests
__construct ( integer $userid = null, string $key = null, string $scope = 'account' ) creates new Pheal API object
__get ( string $name ) : Pheal | null Magic __get method used to set scope
clearAccess ( ) : void clear+reset keyType/accessMask
detectAccess ( ) : boolean | Pheal\Core\Result if userid+key is given it automatically detects (api call) the keyinfo and set the correct access level for futher checks.
setAccess ( string $keyType = null, integer $accessMask ) : void Set keyType/accessMask

Private Methods

Method Description
requestXml ( string $scope, string $name, array $opts = [] ) : Pheal\Core\Result method will ask caching class for valid xml, if non valid available will make API call, and return the appropriate result

Method Details

__call() public method

Magic __call method, will translate all function calls to object to API requests
public __call ( String $name, array $arguments ) : Pheal\Core\Result
$name String name of the function
$arguments array an array of arguments
return Pheal\Core\Result

__construct() public method

creates new Pheal API object
public __construct ( integer $userid = null, string $key = null, string $scope = 'account' )
$userid integer the EVE userid/keyID
$key string the EVE apikey/vCode
$scope string to use, defaults to account. can be changed during runtime by modifying attribute "scope"

__get() public method

Magic __get method used to set scope
public __get ( string $name ) : Pheal | null
$name string name of the scope e.g. "mapScope"
return Pheal | null

clearAccess() public method

clear+reset keyType/accessMask
public clearAccess ( ) : void
return void

detectAccess() public method

Keep in mind this method will make an api request to account/APIKeyInfo based on the given \Pheal\Core\Config settings with the given key credentials. More important! This method will throw Exceptions on invalid keys or networks errors So place this call into your try statement
public detectAccess ( ) : boolean | Pheal\Core\Result
return boolean | Pheal\Core\Result

setAccess() public method

Set keyType/accessMask
public setAccess ( string $keyType = null, integer $accessMask ) : void
$keyType string must be Account/Character/Corporation or null
$accessMask integer must be integer or 0
return void

Property Details

$scope public_oe property

..)
public string $scope
return string

$xml public_oe property

Result of the last XML request, so application can use the raw xml data
public String $xml
return String