COAR Notify
 
Loading...
Searching...
No Matches
coarnotify\core\activitystreams2\ActivityStream Class Reference

Public Member Functions

 __construct ($raw=null)
 
 getDoc ()
 
 setDoc ($doc)
 
 getContext ()
 
 setContext ($context)
 
 setProperty ($property, $value)
 
 getProperty ($property)
 
 toJsonLd ()
 

Detailed Description

A simple wrapper around an ActivityStreams dictionary object

Construct it with an array that represents an ActivityStreams object, or without to create a fresh, blank object.

Constructor & Destructor Documentation

◆ __construct()

coarnotify\core\activitystreams2\ActivityStream::__construct ( $raw = null)

Construct a new ActivityStream object

Parameters
$rawthe raw ActivityStreams object, as an array

Member Function Documentation

◆ getContext()

coarnotify\core\activitystreams2\ActivityStream::getContext ( )

The json-ld context of the ActivityStream

◆ getDoc()

coarnotify\core\activitystreams2\ActivityStream::getDoc ( )

The internal dictionary representation of the ActivityStream, without the json-ld context

◆ getProperty()

coarnotify\core\activitystreams2\ActivityStream::getProperty ( $property)

Get an arbitrary property on the object. The property name can be one of:

  • A simple string with the property name
  • An array of a property id, propertyname name and the full namespace ["example_name", "name", "http://example.com/ns"]
  • An array containing the property id, property name and another tuple of the short name and the full namespace ["example_name", "name", ["as", "http://example.com/ns"]]
Parameters
$propertythe property name
Returns
: the value of the property, or null if it does not exist

◆ setProperty()

coarnotify\core\activitystreams2\ActivityStream::setProperty ( $property,
$value )

Set an arbitrary property on the object. The property name can be one of:

  • A simple string with the property name
  • An array of a property id, propertyname name and the full namespace ["example_name", "name", "http://example.com/ns"]
  • An array containing the property id, property name and another tuple of the short name and the full namespace ["example_name", "name", ["as", "http://example.com/ns"]]
Parameters
$propertythe property name or tuple
$valuethe value to set for the property

◆ toJsonLd()

coarnotify\core\activitystreams2\ActivityStream::toJsonLd ( )

Get the activity stream as a JSON-LD object


The documentation for this class was generated from the following file: