Documentation

SingleInstance extends Event
in package

PHP library to access FDSN Webservices and request Event (earthquake) information in text format

Tags
see
https://www.fdsn.org/webservices/fdsnws-event-1.2.pdf

FDSN official documentation

Table of Contents

Constants

basePath  = 'https://%s/fdsnws/event/1'
defaultFdsnServer  = 'webservices.ms.ingv.it'
fdsnSupportedVersion  = '^1.'

Properties

$arrayOfResults  : array<string|int, mixed>
$counter  : int
$event  : Quake
$eventList  : string
$fdsnServer  : string
$parameters  : array<string|int, mixed>
$url  : string
$version  : string
$webserviceFullPath  : string
$eventId  : Id

Methods

__construct()  : mixed
addFilterByEventId()  : void
Add filter based on ID Event (see https://terremoti.ingv.it/ to get event ids)
details()  : Quake
Get event details , if only one event was found (filtering by eventId or when only one event is found by fetch() )
fetch()  : int
Apply all filter and DO the request to the Official ONT Webservice
getIterator()  : array<string|int, mixed>
Iterate over catalogis found
isDeleted()  : bool
Check if an earthquake is deleted (Shortcut for event type->isDeleted() )
isEarthquake()  : bool
Check if event type is earthquake (Shortcut for event type->isEarthquake() )
isEventIdReplaced()  : bool
Check if event id is replaced (maybe an event is merged to another one)
numRows()  : int
Return the number of elems found
requestId()  : Id
Get request event id
version()  : string
Get FDSN running version
formatIsValid()  : bool
Check if format set is valid
getFetch()  : string
Fetch data from selected FDSN server
parse()  : int
Loop over found elems found (in text format) and convert the to \Fdsn\DataStructure\Quake obj

Constants

basePath

public Base basePath = 'https://%s/fdsnws/event/1'

URL to compile with FDSN server url

defaultFdsnServer

public Default defaultFdsnServer = 'webservices.ms.ingv.it'

server url

fdsnSupportedVersion

public Max fdsnSupportedVersion = '^1.'

supported version

Properties

$arrayOfResults

protected array<string|int, mixed> $arrayOfResults = array()

$counter

protected int $counter = 0

$eventList

protected string $eventList

$parameters

protected array<string|int, mixed> $parameters = array()

$webserviceFullPath

protected string $webserviceFullPath

Methods

__construct()

public __construct(string $format, string|null $user[, string $fdns_server = Fdsnws_Webservice::defaultFdsnServer ]) : mixed
Parameters
$format : string
$user : string|null
$fdns_server : string = Fdsnws_Webservice::defaultFdsnServer

addFilterByEventId()

Add filter based on ID Event (see https://terremoti.ingv.it/ to get event ids)

public addFilterByEventId(Id $eventId) : void
Parameters
$eventId : Id

Unique event ID

details()

Get event details , if only one event was found (filtering by eventId or when only one event is found by fetch() )

public details() : Quake
Return values
Quake

Quake obj

fetch()

Apply all filter and DO the request to the Official ONT Webservice

public fetch() : int
Return values
int

Return the number of elems found

getIterator()

Iterate over catalogis found

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

array of \Fdsn\DataStructure\Catalog obj

isDeleted()

Check if an earthquake is deleted (Shortcut for event type->isDeleted() )

public isDeleted() : bool
Return values
bool

true if is deleted, false otherwise

isEarthquake()

Check if event type is earthquake (Shortcut for event type->isEarthquake() )

public isEarthquake() : bool
Return values
bool

true if is deleted, false otherwise

isEventIdReplaced()

Check if event id is replaced (maybe an event is merged to another one)

public isEventIdReplaced() : bool
Return values
bool

true if is replaced, false otherwise

numRows()

Return the number of elems found

public numRows() : int
Return values
int

The number of elems found

requestId()

Get request event id

public requestId() : Id
Return values
Id

Id obj

version()

Get FDSN running version

public version() : string
Return values
string

FDSN running version (trimmed by newline)

formatIsValid()

Check if format set is valid

protected formatIsValid(string $format) : bool
Parameters
$format : string
Return values
bool

format is valid?

getFetch()

Fetch data from selected FDSN server

protected getFetch(string $url) : string
Parameters
$url : string
Return values
string

downloaded string

parse()

Loop over found elems found (in text format) and convert the to \Fdsn\DataStructure\Quake obj

protected parse(string $response) : int
Parameters
$response : string
Return values
int

        
On this page

Search results