PHP Class Swiftriver\Core\ObjectModel\ObjectFactories\ContentFactory

Author: mg[at]swiftly[dot]org
Exibir arquivo Open project: ushahidi/Swiftriver-2011 Class Usage Examples

Public Methods

Method Description
CreateContent ( Source $source, string $json = null ) : Content Given a source and optional content JSON, this factory method creates a new content item associated with the given source.

Method Details

CreateContent() public static method

If JSON is passed in then this is used to build the content, if not, then source is set and a new unique ID is generated.
public static CreateContent ( Source $source, string $json = null ) : Content
$source Swiftriver\Core\ObjectModel\Source
$json string
return Swiftriver\Core\ObjectModel\Content