PHP Class Swiftriver\SiCDSInterface\Parser

显示文件 Open project: ushahidi/Swiftriver-2011

Public Methods

Method Description
ContentIsUnique ( $json, $id )
ParseItemToRequestJson ( $item, $apiKey )
ParseResponseFromJsonToUniqueIds ( string $json ) : string[] Given the JSON returned from the SiCDS, this function attempts to parse and return an array of content item ID's that have been classified as unique.
ParseToRequestJson ( Content[] $items, string $apiKey ) : string Given a array of content items, this function will parse the diff collections of each item to JSON formtted for the SiCDS cloud service interface.

Method Details

ContentIsUnique() public method

public ContentIsUnique ( $json, $id )

ParseItemToRequestJson() public method

public ParseItemToRequestJson ( $item, $apiKey )

ParseResponseFromJsonToUniqueIds() public method

Given the JSON returned from the SiCDS, this function attempts to parse and return an array of content item ID's that have been classified as unique.
public ParseResponseFromJsonToUniqueIds ( string $json ) : string[]
$json string
return string[]

ParseToRequestJson() public method

Given a array of content items, this function will parse the diff collections of each item to JSON formtted for the SiCDS cloud service interface.
public ParseToRequestJson ( Content[] $items, string $apiKey ) : string
$items Swiftriver\Core\ObjectModel\Content[]
$apiKey string
return string