ContributorCollection
in package
implements
IteratorAggregate
Get contributors
Table of Contents
Interfaces
- IteratorAggregate
Constants
- curlCloceLatestPhpVersion : mixed = 7
- minValidResponseLines : mixed = 2
- templateUrl : mixed = 'https://emidius.mi.ingv.it/services/macroseism...
Properties
- $contributors : array<string|int, mixed>
- $curlErrInfo : string
- $curlErrNum : int
- $details : array<string|int, mixed>
- $quakeId : QuakeId
Methods
- __construct() : mixed
- curlErrorInfo() : mixed
- curlErrorNumber() : mixed
- fetch() : int
- find contributor based on quakeId
- findBestContributorByAnalysisType() : Contributor
- 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
- isCurlCloseSupported() : bool
- Check if curl_close is still supported
- keepOnlyRowsWithMdpSet() : mixed
- filter rows with no mdpset
Constants
curlCloceLatestPhpVersion
private
mixed
curlCloceLatestPhpVersion
= 7
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
QuakeId
$quakeId
Methods
__construct()
public
__construct(QuakeId $quakeId) : mixed
Parameters
- $quakeId : QuakeId
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) : Contributor
Parameters
- $analysisNames : array<string|int, mixed>
Return values
Contributor —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(ContributorData $contributor) : bool
Parameters
- $contributor : ContributorData
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
intisCurlCloseSupported()
Check if curl_close is still supported
private
isCurlCloseSupported() : bool
Return values
bool —true is supported, false otherwise
keepOnlyRowsWithMdpSet()
filter rows with no mdpset
private
keepOnlyRowsWithMdpSet(mixed $row) : mixed
Parameters
- $row : mixed