Conversation.php

Summary
Conversation.php
schemaDefReturns an array representing the schema that describes the conversation in the backend database.
beforeSchemaUpdateIntegrity checks before we
createFactory method for creating a new conversation.
noticeCountReturns the number of notices in this conversation.
getUrlFromNoticeRetrieves a the conversation for a given notice, and then returns the URL for the associated conversation.
getUriReturns the URI of the conversation.
getUrlReturns the URL of the conversation.
getNoticesReturns a stream containing the notices associated with this conversation.
insertSave the conversation entry into the database.

schemaDef

public static function schemaDef()

Returns an array representing the schema that describes the conversation in the backend database.

beforeSchemaUpdate

static public function beforeSchemaUpdate()

Integrity checks before we

create

static function create(ActivityContext $ctx = null,
 $created = null)

Factory method for creating a new conversation.

Use this for locally initiated conversations.  Remote notices should preferrably supply their own conversation URIs in the OStatus feed.

Returns

  • the created Conversation object

noticeCount

static function noticeCount($id)

Returns the number of notices in this conversation.

getUrlFromNotice

static public function getUrlFromNotice(Notice $notice,  
 $anchor = true)

Retrieves a the conversation for a given notice, and then returns the URL for the associated conversation.

getUri

public function getUri()

Returns the URI of the conversation.

getUrl

public function getUrl($noticeId = null)

Returns the URL of the conversation.

getNotices

public function getNotices(Profile $scoped = null,
 $offset = 0,
 $limit = 500)

Returns a stream containing the notices associated with this conversation.

FIXME: ...will 500 ever be too low?  Taken from ConversationAction::MAX_NOTICES

insert

public function insert()

Save the conversation entry into the database.

public static function schemaDef()
Returns an array representing the schema that describes the conversation in the backend database.
static public function beforeSchemaUpdate()
Integrity checks before we
static function create(ActivityContext $ctx = null,
 $created = null)
Factory method for creating a new conversation.
static function noticeCount($id)
Returns the number of notices in this conversation.
static public function getUrlFromNotice(Notice $notice,  
 $anchor = true)
Retrieves a the conversation for a given notice, and then returns the URL for the associated conversation.
public function getUri()
Returns the URI of the conversation.
public function getUrl($noticeId = null)
Returns the URL of the conversation.
public function getNotices(Profile $scoped = null,
 $offset = 0,
 $limit = 500)
Returns a stream containing the notices associated with this conversation.
public function insert()
Save the conversation entry into the database.