PHP 클래스 Swiftriver\Core\Modules\DataContext\MySql_V2\DataContext

저자: mg[at]swiftly[dot]org
상속: implements Swiftriver\Core\DAL\DataContextInterfaces\IAPIKeyDataContext, implements Swiftriver\Core\DAL\DataContextInterfaces\IChannelDataContext, implements Swiftriver\Core\DAL\DataContextInterfaces\IContentDataContext, implements Swiftriver\Core\DAL\DataContextInterfaces\ISourceDataContext, implements Swiftriver\Core\DAL\DataContextInterfaces\ITrustLogDataContext
파일 보기 프로젝트 열기: ushahidi/Swiftriver-2011 1 사용 예제들

공개 메소드들

메소드 설명
AddRegisteredCoreAPIKey ( string $key ) : boolean Given a new APIKey, this method adds it to the data store or registered API keys.
DeleteContent ( Content[] $content ) Given an array of content items, this method removes them from the data store.
GetChannelsById ( string[] $ids ) : Channel[] Given the IDs of Channels, this method gets them from the underlying data store
GetContent ( string[] $ids, $orderby = null ) : Content[] Given an array of content is's, this function will fetch the content objects from the data store.
GetContentList ( string[] $parameters )
GetSourcesById ( string[] $ids ) : Source[] Given the IDs of Sources, this method gets them from the underlying data store
IsRegisterdCoreAPIKey ( string $key ) : boolean Checks that the given API Key is registed for this Core install
ListAllChannels ( ) : Channel[] Lists all the current Channel in the core
ListAllSources ( ) : Source[] Lists all the current Source in the core
PDOConnection ( ) : PDO Generic function used to gain a new PDO connection to the database.
RecordSourceScoreChange ( string $sourceId, string $markerId, integer $change, string | null $reason = null ) This method redords the fact that a marker (sweeper) has changed the score of a source by marking a content items as either 'acurate', 'chatter' or 'inacurate'
RemoveChannels ( string[] $ids ) Given a list of IDs this method removes the Channels from the data store.
RemoveRegisteredCoreAPIKey ( $key ) : boolean Given an APIKey, this method will remove it from the data store of registered API Keys Returns true on sucess
SaveChannels ( $channels ) Adds a list of new Channels to the data store
SaveContent ( Content[] $content ) Given a set of content items, this method will persist them to the data store, if they already exists then this method should update the values in the data store.
SelectNextDueChannel ( DateTime $time ) : Channel Given a date time, this function returns the next due Channel.

메소드 상세

AddRegisteredCoreAPIKey() 공개 정적인 메소드

Returns true on sucess
public static AddRegisteredCoreAPIKey ( string $key ) : boolean
$key string
리턴 boolean

DeleteContent() 공개 정적인 메소드

Given an array of content items, this method removes them from the data store.
public static DeleteContent ( Content[] $content )
$content Swiftriver\Core\ObjectModel\Content[]

GetChannelsById() 공개 정적인 메소드

Given the IDs of Channels, this method gets them from the underlying data store
public static GetChannelsById ( string[] $ids ) : Channel[]
$ids string[]
리턴 Swiftriver\Core\ObjectModel\Channel[]

GetContent() 공개 정적인 메소드

Given an array of content is's, this function will fetch the content objects from the data store.
public static GetContent ( string[] $ids, $orderby = null ) : Content[]
$ids string[]
리턴 Swiftriver\Core\ObjectModel\Content[]

GetContentList() 공개 정적인 메소드

public static GetContentList ( string[] $parameters )
$parameters string[]

GetSourcesById() 공개 정적인 메소드

Given the IDs of Sources, this method gets them from the underlying data store
public static GetSourcesById ( string[] $ids ) : Source[]
$ids string[]
리턴 Swiftriver\Core\ObjectModel\Source[]

IsRegisterdCoreAPIKey() 공개 정적인 메소드

Checks that the given API Key is registed for this Core install
public static IsRegisterdCoreAPIKey ( string $key ) : boolean
$key string
리턴 boolean

ListAllChannels() 공개 정적인 메소드

Lists all the current Channel in the core
public static ListAllChannels ( ) : Channel[]
리턴 Swiftriver\Core\ObjectModel\Channel[]

ListAllSources() 공개 정적인 메소드

Lists all the current Source in the core
public static ListAllSources ( ) : Source[]
리턴 Swiftriver\Core\ObjectModel\Source[]

PDOConnection() 공개 정적인 메소드

Generic function used to gain a new PDO connection to the database.
public static PDOConnection ( ) : PDO
리턴 PDO

RecordSourceScoreChange() 공개 정적인 메소드

This method redords the fact that a marker (sweeper) has changed the score of a source by marking a content items as either 'acurate', 'chatter' or 'inacurate'
public static RecordSourceScoreChange ( string $sourceId, string $markerId, integer $change, string | null $reason = null )
$sourceId string
$markerId string
$change integer
$reason string | null

RemoveChannels() 공개 정적인 메소드

Given a list of IDs this method removes the Channels from the data store.
public static RemoveChannels ( string[] $ids )
$ids string[]

RemoveRegisteredCoreAPIKey() 공개 정적인 메소드

Given an APIKey, this method will remove it from the data store of registered API Keys Returns true on sucess
public static RemoveRegisteredCoreAPIKey ( $key ) : boolean
리턴 boolean

SaveChannels() 공개 정적인 메소드

Adds a list of new Channels to the data store
public static SaveChannels ( $channels )

SaveContent() 공개 정적인 메소드

Given a set of content items, this method will persist them to the data store, if they already exists then this method should update the values in the data store.
public static SaveContent ( Content[] $content )
$content Swiftriver\Core\ObjectModel\Content[]

SelectNextDueChannel() 공개 정적인 메소드

Given a date time, this function returns the next due Channel.
public static SelectNextDueChannel ( DateTime $time ) : Channel
$time DateTime
리턴 Swiftriver\Core\ObjectModel\Channel