Documentation

Csv extends ThematicEffect
in package

Fetch CSV thematic effect data from HSIT portal

Table of Contents

Constants

fileExtension  = 'csv'
templateUrl  = 'https://e.hsit.it/%d/%d_%s.%s'
dataStartsAtLine  = 1

Properties

$curlErrInfo  : string
$curlErrNum  : int
$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)

Constants

fileExtension

protected mixed fileExtension = 'csv'

templateUrl

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

dataStartsAtLine

private mixed dataStartsAtLine = 1

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


        
On this page

Search results