-
Notifications
You must be signed in to change notification settings - Fork 11
CAP Processor info
The infoBlock Class initializes the info part of a CAP
The container for all component parts of the info sub-element of the alert message (OPTIONAL)
$info->language = "en-US"; // language-COUNTRY Format RFC 3066 Specification: de-DE -> German
$info->category = array(); // Geo / Met / Safety / Security / Rescue / Fire / Health / Env / Transport / Infra / CBRNE / Other
$info->event; // The text denoting the type of the subject event of the alert message
$info->responseType = array(); // Shelter / Evacuate / Prepare / Execute / Avoid / Monitor / Assess / AllClear / None
$info->urgency; // Immediate / Expected / Future / Past
$info->severity; // Extreme / Severe / Moderate / Minor / Unknown
$info->certainty; // Observed / Likely / Possible/ Unlikely / Unknown
$info->audience; // The text describing the intended audience of the alert message
$info->eventCode = array(); // <eventCode> <valueName>valueName</valuename> <value>value</value></eventcode>
$info->effective; // The effective time(oid) / Form: <yyyy>-<MM>-T<HH>:<mm>:<ss>+<hour>:<min> Offset to UTC
$info->onset; // The expected time of the beginning of the subject event of the alert message / Form: <yyyy>-<MM>-T<HH>:<mm>:<ss>+<hour>:<min> Offset to UTC -> 2015-01-08T10:05:02+01:00
$info->expires; // The expiry time of the information of the alert message / Form: <yyyy>-<MM>-T<HH>:<mm>:<ss>+<hour>:<min> Offset to UTC -> 2015-01-08T15:00:13+01:00
$info->senderName; // The text naming the originator of the alert message (The human-readable name of the agency or authority issuing this alert.) -> ZAMG Österreich
$info->headline; // The text headline of the alert message
$info->description; // The text describing the subject event of the alert message
$info->instruction; // The text describing the recommended action to be taken by recipients of the alert message
$info->web; // The identifier of the hyperlink associating additional information with the alert message
$info->contact; // The text describing the contact for follow-up and confirmation of the alert message
$info->parameter = array(); // A system-specific additional parameter associated with the alert message (as example meteoalarm.eu using it as specific warnings identifier) <parameter> <valueName>valueName</valuename> <value>value</value></parameter>
$info->resource = array();
$info->area = array();
$info = $alert->addInfo();
returns the Language
The code denoting the language of the info sub-element of the alert message (OPTIONAL) (1) Code Values: Natural language identifier per [RFC 3066]. (2) If not present, an implicit default value of "en-US" SHALL be assumed. (3) A null value in this element SHALL be considered equivalent to “en-US.”
$alert->getLanguage();
sets the value of the Language
The code denoting the language of the info sub-element of the alert message (OPTIONAL) (1) Code Values: Natural language identifier per [RFC 3066]. (2) If not present, an implicit default value of "en-US" SHALL be assumed. (3) A null value in this element SHALL be considered equivalent to “en-US.”
$alert->setLanguage('LANG_RFC_3066');
returns the Category
The code denoting the category of the subject event of the alert message (REQUIRED) Geo - Geophysical (inc. landslide) Met - Meteorological (inc. flood) Safety - General emergency and public safety Security - Law enforcement, military, homeland and local/private security Rescue - Rescue and recovery Fire - Fire suppression and rescue Health - Medical and public health Env - Pollution and other environmental Transport - Public and private transportation Infra - Utility, telecommunication, other non-transport infrastructure CBRNE – Chemical, Biological, Radiological, Nuclear or High-Yield Explosive threat or attack Other - Other events
(2) Multiple instances MAY occur within an <info> block.
$alert->getCategory();
sets the value of the status
This method will return false if not one of thes values is used:
The code denoting the category of the subject event of the alert message (REQUIRED) Geo - Geophysical (inc. landslide) Met - Meteorological (inc. flood) Safety - General emergency and public safety Security - Law enforcement, military, homeland and local/private security Rescue - Rescue and recovery Fire - Fire suppression and rescue Health - Medical and public health Env - Pollution and other environmental Transport - Public and private transportation Infra - Utility, telecommunication, other non-transport infrastructure CBRNE – Chemical, Biological, Radiological, Nuclear or High-Yield Explosive threat or attack Other - Other events
(2) Multiple instances MAY occur within an <info> block.
$alert->setCategory('POS_VALUE');
returns the Event
The text denoting the type of the subject event of the alert message (REQUIRED)
$alert->getEvent();
sets the value of the Event
The text denoting the type of the subject event of the alert message (REQUIRED)
$alert->setEvent('EVENT');
returns the ResponseType
The code denoting the type of action recommended for the target audience (OPTIONAL) (2) Multiple instances MAY occur within an <info> block.
Shelter – Take shelter in place or per <instruction> Evacuate – Relocate as instructed in the <instruction> Prepare – Make preparations per the <instruction> Execute – Execute a pre-planned activity identified in <instruction> Avoid – Avoid the subject event as per the <instruction> Monitor – Attend to information sources as described in <instruction> Assess – Evaluate the information in this message. (This value SHOULD NOT be used in public warning applications.) AllClear – The subject event no longer poses a threat or concern and any follow on action is described in <instruction> None – No action recommended
$alert->getResponseType();
sets the value of the ResponseType
The code denoting the type of action recommended for the target audience (OPTIONAL) (2) Multiple instances MAY occur within an <info> block.This method will return false if not one of thes values is used:
Shelter – Take shelter in place or per <instruction> Evacuate – Relocate as instructed in the <instruction> Prepare – Make preparations per the <instruction> Execute – Execute a pre-planned activity identified in <instruction> Avoid – Avoid the subject event as per the <instruction> Monitor – Attend to information sources as described in <instruction> Assess – Evaluate the information in this message. (This value SHOULD NOT be used in public warning applications.) AllClear – The subject event no longer poses a threat or concern and any follow on action is described in <instruction> None – No action recommended
$alert->ResponseType('POS_VALUE');
returns the Urgency
The code denoting the urgency of the subject event of the alert message (REQUIRED) (1) The <urgency>, <severity>, and <certainty> elements collectively distinguish less emphatic from more emphatic messages.
Immediate - Responsive action SHOULD be taken immediately Expected - Responsive action SHOULD be taken soon (within next hour) Future - Responsive action SHOULD be taken in the near future Past - Responsive action is no longer required Unknown - Urgency not known
$alert->getUrgency();
sets the value of the Urgency
The code denoting the urgency of the subject event of the alert message (REQUIRED) (1) The <urgency>, <severity>, and <certainty> elements collectively distinguish less emphatic from more emphatic messages.This method will return false if not one of thes values is used:
Immediate - Responsive action SHOULD be taken immediately Expected - Responsive action SHOULD be taken soon (within next hour) Future - Responsive action SHOULD be taken in the near future Past - Responsive action is no longer required Unknown - Urgency not known
$alert->setUrgency('POS_VALUE');
returns the Severity
The code denoting the severity of the subject event of the alert message (REQUIRED) (1) The <urgency>, <severity>, and <certainty> elements collectively distinguish less emphatic from more emphatic messages.
Extreme - Extraordinary threat to life or property Severe - Significant threat to life or property Moderate - Possible threat to life or property Minor – Minimal to no known threat to life or property Unknown - Severity unknown
$alert->getSeverity();
sets the value of the Severity
The code denoting the severity of the subject event of the alert message (REQUIRED) (1) The <urgency>, <severity>, and <certainty> elements collectively distinguish less emphatic from more emphatic messages.This method will return false if not one of thes values is used:
Immediate - Responsive action SHOULD be taken immediately Expected - Responsive action SHOULD be taken soon (within next hour) Future - Responsive action SHOULD be taken in the near future Past - Responsive action is no longer required Unknown - Urgency not known
$alert->setSeverity('POS_VALUE');
returns the Certainty
The code denoting the certainty of the subject event of the alert message (REQUIRED) (1) The <urgency>, <severity>, and <certainty> elements collectively distinguish less emphatic from more emphatic messages.
Extreme - Extraordinary threat to life or property Severe - Significant threat to life or property Moderate - Possible threat to life or property Minor – Minimal to no known threat to life or property Unknown - Severity unknown
$alert->getCertainty();
sets the value of the Certainty
The code denoting the certainty of the subject event of the alert message (REQUIRED) (1) The <urgency>, <severity>, and <certainty> elements collectively distinguish less emphatic from more emphatic messages.This method will return false if not one of thes values is used:
Extreme - Extraordinary threat to life or property Severe - Significant threat to life or property Moderate - Possible threat to life or property Minor – Minimal to no known threat to life or property Unknown - Severity unknown
$alert->setCertainty('POS_VALUE');
returns the Audience
The text describing the intended audience of the alert message (OPTIONAL)
$alert->getAudience();
sets the value of the Audience
The text describing the intended audience of the alert message (OPTIONAL)
$alert->setAudience('AUDIENCE');
returns the EventCode Array
A system-specific code identifying the event type of the alert message (OPTIONAL)
(1) Any system-specific code for event typing, in the form: <eventCode> <valueName>valueName</valuename> <value>value</value> </eventcode> where the content of “valueName” is a user-assigned string designating the domain of the code, and the content of “value” is a string (which may represent a number) denoting the value itself (e.g., valueName ="SAME" and value="CEM"). (2) Values of “valueName” that are acronyms SHOULD be represented in all capital letters without periods (e.g., SAME, FIPS, ZIP). (3) Multiple instances MAY occur within an <info> block.
$alert->getEventCode();
sets the value of the EventCode
A system-specific code identifying the event type of the alert message (OPTIONAL)
(1) Any system-specific code for event typing, in the form: <eventCode> <valueName>valueName</valuename> <value>value</value> </eventcode> where the content of “valueName” is a user-assigned string designating the domain of the code, and the content of “value” is a string (which may represent a number) denoting the value itself (e.g., valueName ="SAME" and value="CEM"). (2) Values of “valueName” that are acronyms SHOULD be represented in all capital letters without periods (e.g., SAME, FIPS, ZIP). (3) Multiple instances MAY occur within an <info> block.
$alert->setEventCode('EVENT_NAME', 'EVENT_VALUE', INDEX_NUM);
returns the Effective
The effective time of the information of the alert message (OPTIONAL)
(1) The date and time SHALL be represented in the DateTime Data Type (See Implementation Notes) format (e.g., “2002-05-24T16:49:00-07:00” for 24 May 2002 at 16: 49 PDT). (2) Alphabetic timezone designators such as “Z” MUST NOT be used. The timezone for UTC MUST be represented as “-00:00”. (3) If this item is not included, the effective time SHALL be assumed to be the same as in <sent>.
$alert->getEffective();
sets the value of the Effective
This method uses strtotime() to convert a given time string to the CAP DateTime
posible values:
2002-05-24T16:49:00-07:00 24 May 2002 at 16:49 PDT now + 1 day + 1 hour + 1 min + 1 sec
The effective time of the information of the alert message (OPTIONAL)
(1) The date and time SHALL be represented in the DateTime Data Type (See Implementation Notes) format (e.g., “2002-05-24T16:49:00-07:00” for 24 May 2002 at 16: 49 PDT). (2) Alphabetic timezone designators such as “Z” MUST NOT be used. The timezone for UTC MUST be represented as “-00:00”. (3) If this item is not included, the effective time SHALL be assumed to be the same as in <sent>.
$alert->setEffective('2002-05-24T16:49:00-07:00');
returns the Onset
The expected time of the beginning of the subject event of the alert message (OPTIONAL)
(1) The date and time SHALL be represented in the DateTime Data Type (See Implementation Notes) format (e.g., “2002-05-24T16:49:00-07:00” for 24 May 2002 at 16: 49 PDT). (2) Alphabetic timezone designators such as “Z” MUST NOT be used. The timezone for UTC MUST be represented as “-00:00”.
$alert->getOnset();
sets the value of the Onset
This method uses strtotime() to convert a given time string to the CAP DateTime
posible values:
The expected time of the beginning of the subject event of the alert message (OPTIONAL)
(1) The date and time SHALL be represented in the DateTime Data Type (See Implementation Notes) format (e.g., “2002-05-24T16:49:00-07:00” for 24 May 2002 at 16: 49 PDT). (2) Alphabetic timezone designators such as “Z” MUST NOT be used. The timezone for UTC MUST be represented as “-00:00”.
$alert->setOnset('2002-05-24T16:49:00-07:00');
returns the Onset
The expiry time of the information of the alert message (OPTIONAL)
(1) The date and time SHALL be represented in the DateTime Data Type (See Implementation Notes) format (e.g., “2002-05-24T16:49:00-07:00” for 24 May 2002 at 16:49 PDT). (2) Alphabetic timezone designators such as “Z” MUST NOT be used. The timezone for UTC MUST be represented as “-00:00”. (3) If this item is not provided, each recipient is free to set its own policy as to when the message is no longer in effect.
$alert->getExpires();
sets the value of the Onset
This method uses strtotime() to convert a given time string to the CAP DateTime
posible values:
The expiry time of the information of the alert message (OPTIONAL)
(1) The date and time SHALL be represented in the DateTime Data Type (See Implementation Notes) format (e.g., “2002-05-24T16:49:00-07:00” for 24 May 2002 at 16:49 PDT). (2) Alphabetic timezone designators such as “Z” MUST NOT be used. The timezone for UTC MUST be represented as “-00:00”. (3) If this item is not provided, each recipient is free to set its own policy as to when the message is no longer in effect.
$alert->setExpires('2002-05-24T16:49:00-07:00');
returns the Sender Name
The text naming the originator of the alert message (OPTIONAL)
The human-readable name of the agency or authority issuing this alert.
$alert->getSenderName();
sets the value of the Sender Name
The text naming the originator of the alert message (OPTIONAL)
The human-readable name of the agency or authority issuing this alert.
$alert->setSenderName('SENDERNAME');
returns the Headline
The text headline of the alert message (OPTIONAL)
A brief human-readable headline. Note that some displays (for example, short messaging service devices) may only present this headline; it SHOULD be made as direct and actionable as possible while remaining short. 160 characters MAY be a useful target limit for headline length.
$alert->getHeadline();
sets the value of the Headline
The text headline of the alert message (OPTIONAL)
A brief human-readable headline. Note that some displays (for example, short messaging service devices) may only present this headline; it SHOULD be made as direct and actionable as possible while remaining short. 160 characters MAY be a useful target limit for headline length.
$alert->setHeadline('HEADLINE');
returns the Description
The text describing the subject event of the alert message (OPTIONAL)
An extended human readable description of the hazard or event that occasioned this message.
$alert->getDescription();
sets the value of the Description
The text describing the subject event of the alert message (OPTIONAL)
An extended human readable description of the hazard or event that occasioned this message.
$alert->setDescription('DESCRIPTION');
returns the Instruction
The text describing the recommended action to be taken by recipients of the alert message (OPTIONAL)
An extended human readable instruction to targeted recipients. If different instructions are intended for different recipients, they should be represented by use of multiple <info> blocks.
$alert->getInstruction();
sets the value of the Instruction
The text describing the recommended action to be taken by recipients of the alert message (OPTIONAL)
An extended human readable instruction to targeted recipients. If different instructions are intended for different recipients, they should be represented by use of multiple <info> blocks.
$alert->setInstruction('INSTUCTION');
returns the Web
The identifier of the hyperlink associating additional information with the alert message (OPTIONAL)
A full, absolute URI for an HTML page or other text resource with additional or reference information regarding this alert.
$alert->getWeb();
sets the value of the Web
The identifier of the hyperlink associating additional information with the alert message (OPTIONAL)
A full, absolute URI for an HTML page or other text resource with additional or reference information regarding this alert.
$alert->setWeb('WEB');
returns the Instruction
The text describing the contact for follow-up and confirmation of the alert message (OPTIONAL)
$alert->getContact();
sets the value of the Instruction
The text describing the contact for follow-up and confirmation of the alert message (OPTIONAL)
A full, absolute URI for an HTML page or other text resource with additional or reference information regarding this alert.
$alert->setContact('CONTACT');
returns the Parameter Array
A system-specific additional parameter associated with the alert message (OPTIONAL)
(1) Any system-specific datum, in the form: <parameter> <valueName>valueName</valuename> <value>value</value> </parameter> where the content of “valueName” is a user-assigned string designating the domain of the code, and the content of “value” is a string (which may represent a number) denoting the value itself (e.g., valueName ="SAME" and value="CIV"). (2) Values of “valueName” that are acronyms SHOULD be represented in all capital letters without periods (e.g., SAME, FIPS, ZIP). (3) Multiple instances MAY occur within an <info> block.
$alert->getParameter();
sets the value of the Parameter
A system-specific additional parameter associated with the alert message (OPTIONAL)
(1) Any system-specific datum, in the form: <parameter> <valueName>valueName</valuename> <value>value</value> </parameter> where the content of “valueName” is a user-assigned string designating the domain of the code, and the content of “value” is a string (which may represent a number) denoting the value itself (e.g., valueName ="SAME" and value="CIV"). (2) Values of “valueName” that are acronyms SHOULD be represented in all capital letters without periods (e.g., SAME, FIPS, ZIP). (3) Multiple instances MAY occur within an <info> block.
$alert->setParameter('PARAMETER_NAME', 'PARAMETER_VALUE', INDEX_NUM);
returns the instanz of the resourceBlock on the given index (default: 0)
create a new resourceBlock instanz at the given index
this will create a new resource block part of the cap
$cap->setResource();
redirect of setResource()
$cap->addResource();
returns the instanz of the areaBlock on the given index (default: 0)
create a new areaBlock instanz at the given index
this will create a new area block part of the cap
$cap->setArea();
redirect of setArea()
$cap->addArea();
Special ... with additional meteoalarm.eu webservice functions (www.meteoalarm.eu)