PHP Class Swiftriver\UshahidiAPIInterface\ContentToUshahidiAPIParser

Show file Open project: ushahidi/Swiftriver-2011

Public Methods

Method Description
ParseContentItemToUshahidiAPIFormat ( Content $content ) : string[] Given content items, this function parses the properties of the content into the format required by the Ushahidi API.

Private Methods

Method Description
ExtractDateFromContent ( Content $content ) : time Extract the incident date from the content item
ExtractDescriptionFromContent ( $content )
ExtractLocationDataFromContent ( Content $content ) : GisData Returns the most appropriate long and latt from the given Content item.
ExtractLocationNameFromContent ( Content $content ) : string Given a content item, this function extracts the first where tag from its tags collection or returns 'unknown'
ExtractUshahidiCategoriesFromContent ( Content $content ) : string Returns the comma separated list of Ushahidi categories

Method Details

ParseContentItemToUshahidiAPIFormat() public method

Given content items, this function parses the properties of the content into the format required by the Ushahidi API.
public ParseContentItemToUshahidiAPIFormat ( Content $content ) : string[]
$content Swiftriver\Core\ObjectModel\Content
return string[] parameters