MultiInstance
in package
implements
IteratorAggregate
Get contributors
Table of Contents
Interfaces
- IteratorAggregate
Constants
- minValidResponseLines = 2
- templateUrl = 'https://emidius.mi.ingv.it/services/macroseismic/query?eventid=%s&includeallmdpsets=true&format=textmacro'
Properties
- $contributors : array<string|int, mixed>
- $curlErrInfo : string
- $curlErrNum : int
- $details : array<string|int, mixed>
- $quakeId : IdStruct
Methods
- __construct() : mixed
- curlErrorInfo() : mixed
- curlErrorNumber() : mixed
- fetch() : int
- find contributor based on quakeId
- findBestContributorByAnalysisType() : SingleInstance
- get the "best" contributor based an array of analysis type
- getIterator() : array<string|int, mixed>
- get all contributors
- setPreferred() : bool
- string $contributor set already choose contributor
- findContributors() : int
- divide found contributors by intensity-type of study
- keepOnlyRowsWithMdpSet() : mixed
- filter rows with no mdpset
Constants
minValidResponseLines
private
mixed
minValidResponseLines
= 2
templateUrl
private
mixed
templateUrl
= 'https://emidius.mi.ingv.it/services/macroseismic/query?eventid=%s&includeallmdpsets=true&format=textmacro'
Properties
$contributors
private
array<string|int, mixed>
$contributors
= array()
$curlErrInfo
private
string
$curlErrInfo
= ''
$curlErrNum
private
int
$curlErrNum
= 0
$details
private
array<string|int, mixed>
$details
= array()
$quakeId
private
IdStruct
$quakeId
Methods
__construct()
public
__construct(IdStruct $quakeId) : mixed
Parameters
- $quakeId : IdStruct
curlErrorInfo()
public
curlErrorInfo() : mixed
curlErrorNumber()
public
curlErrorNumber() : mixed
fetch()
find contributor based on quakeId
public
fetch() : int
Return values
int —number of studies found
findBestContributorByAnalysisType()
get the "best" contributor based an array of analysis type
public
findBestContributorByAnalysisType(array<string|int, mixed> $analysisNames) : SingleInstance
Parameters
- $analysisNames : array<string|int, mixed>
Return values
SingleInstance —the Contributor found or null
getIterator()
get all contributors
public
getIterator() : array<string|int, mixed>
Return values
array<string|int, mixed> —array of strings with the found contributors
setPreferred()
string $contributor set already choose contributor
public
setPreferred(Struct $contributor) : bool
Parameters
- $contributor : Struct
Return values
bool —TRUE contributor found, false otherwise
findContributors()
divide found contributors by intensity-type of study
private
findContributors(mixed $downloadedData) : int
Parameters
- $downloadedData : mixed
Return values
intkeepOnlyRowsWithMdpSet()
filter rows with no mdpset
private
keepOnlyRowsWithMdpSet(mixed $row) : mixed
Parameters
- $row : mixed