Documentation

Xml extends ThematicEffect
in package

Fetch XML thematic effect data from HSIT portal

Table of Contents

Constants

fileExtension  = 'xml'
templateUrl  = 'https://e.hsit.it/%d/%d_%s.%s'

Properties

$idQuake  : Id
$localFileFullPath  : string|null
$places  : array<string|int, mixed>
$thematicEffectStudyName  : string

Methods

__construct()  : mixed
fetch()  : int
fetch data from url (remote or local - if $localFileFullPath is set in __construct)
getIterator()  : array<string|int, mixed>
get all places percentage
fetchFromLocalPath()  : array<string|int, mixed>
fetch data from local path - if $localFileFullPath is set in __construct)
fetchFromUrl()  : array<string|int, mixed>
fetch data from remote url path - if $localFileFullPath is set NOT in __construct)
isValidType()  : bool
check if thematic effect study is supported

Constants

fileExtension

protected mixed fileExtension = 'xml'

templateUrl

protected mixed templateUrl = 'https://e.hsit.it/%d/%d_%s.%s'

Properties

$localFileFullPath

protected string|null $localFileFullPath = null

$thematicEffectStudyName

protected string $thematicEffectStudyName

Methods

__construct()

public __construct(Id $fdsnQuakeId, string $thematicEffectStudyName[, string|null $localFileFullPath = null ]) : mixed
Parameters
$fdsnQuakeId : Id
$thematicEffectStudyName : string
$localFileFullPath : string|null = null

fetch()

fetch data from url (remote or local - if $localFileFullPath is set in __construct)

public fetch() : int
Return values
int

number of data found

getIterator()

get all places percentage

public getIterator() : array<string|int, mixed>
Return values
array<string|int, mixed>

locality percentage (array of associative arrays[lat, lon, percentage, reports, placeName] )

fetchFromLocalPath()

fetch data from local path - if $localFileFullPath is set in __construct)

protected fetchFromLocalPath() : array<string|int, mixed>
Return values
array<string|int, mixed>

data from file, splitted in array of lines

fetchFromUrl()

fetch data from remote url path - if $localFileFullPath is set NOT in __construct)

protected fetchFromUrl() : array<string|int, mixed>
Return values
array<string|int, mixed>

data from file, splitted in array of lines

isValidType()

check if thematic effect study is supported

private isValidType(string $thematicEffectStudyName) : bool
Parameters
$thematicEffectStudyName : string

name of the thematic effect study

Return values
bool

TRUE if is supported, FALSE otherwise


        
On this page

Search results