Intensity
in package
implements
IteratorAggregate
Fetch grid.xml intensity file from Shakemaps portal
Table of Contents
Interfaces
- IteratorAggregate
Constants
- dataFile = 'grid.xml'
Properties
- $curlErrInfo : string
- $curlErrNum : int
- $eventId : string
- $localFileFullPath : string|null
- $places : array<string|int, mixed>
- $server : string
Methods
- __construct() : mixed
- fetchFromLocalPath() : string
- fetch data from local path - if $localFileFullPath is set in __construct()
- getIterator() : array<string|int, mixed>
- get all places intensity
- fetchFromUrl() : int
- fetch data from url (remote or local - if $localFileFullPath is set in __construct)
Constants
dataFile
private
mixed
dataFile
= 'grid.xml'
Properties
$curlErrInfo
private
string
$curlErrInfo
$curlErrNum
private
int
$curlErrNum
$eventId
private
string
$eventId
$localFileFullPath
private
string|null
$localFileFullPath
= null
$places
private
array<string|int, mixed>
$places
= array()
$server
private
string
$server
Methods
__construct()
public
__construct(string $eventId[, string|null $shakemapsServer = Settings::defaultShakemapsServer ][, string|null $localFileFullPath = null ]) : mixed
Parameters
- $eventId : string
- $shakemapsServer : string|null = Settings::defaultShakemapsServer
- $localFileFullPath : string|null = null
fetchFromLocalPath()
fetch data from local path - if $localFileFullPath is set in __construct()
public
fetchFromLocalPath() : string
Return values
string —Datafile read in a string or, on missing/unreadable file a RuntimeException is thrown
getIterator()
get all places intensity
public
getIterator() : array<string|int, mixed>
Return values
array<string|int, mixed> —locality intensity (array of associative arrays[DS_LatLon, mmi, pga, pgv, psa03, psa10, psa30, svel])
fetchFromUrl()
fetch data from url (remote or local - if $localFileFullPath is set in __construct)
private
fetchFromUrl() : int
Return values
int —number of data found