Commit 41e283eb by Maiyannah Bishop

ActivityStreamsLink documentation

1 parent e4292bde
......@@ -50,26 +50,38 @@
if (!defined('POSTACTIV')) { exit(1); }
// ----------------------------------------------------------------------------
// Class: ActivityStreamsLink
// Class for links in an ActivityStreams JSON Activity.
//
// Variables:
// o linkDict
class ActivityStreamsLink
{
private $linkDict;
private $linkDict;
function __construct($url = null, $rel = null, $mediaType = null)
{
// links MUST have a URL
if (empty($url)) {
throw new Exception('Links must have a URL.');
}
// -------------------------------------------------------------------------
// Function: __construct
// Class constructor
function __construct($url = null, $rel = null, $mediaType = null) {
// links MUST have a URL
if (empty($url)) {
throw new Exception('Links must have a URL.');
}
$this->linkDict = array(
'url' => $url,
'rel' => $rel, // extension
'type' => $mediaType // extension
);
}
$this->linkDict = array(
'url' => $url,
'rel' => $rel, // extension
'type' => $mediaType // extension
);
}
function asArray()
{
// -------------------------------------------------------------------------
// Function: asArray
// Return the link dictionary as an array
function asArray() {
return array_filter($this->linkDict);
}
}
......
......@@ -9,16 +9,22 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="ActivityStreamsLink.php"></a>ActivityStreamsLink.php</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#ActivityStreamsLink.php" >ActivityStreamsLink.php</a></td><td class=SDescription></td></tr><tr class="SSection"><td class=SEntry><a href="#ActivityStreamsLink" >ActivityStreamsLink</a></td><td class=SDescription>Class for links in an ActivityStreams JSON Activity.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="ActivityStreamsLink.php"></a>ActivityStreamsLink.php</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#ActivityStreamsLink.php" >ActivityStreamsLink.php</a></td><td class=SDescription></td></tr><tr class="SSection"><td class=SEntry><a href="#ActivityStreamsLink" >ActivityStreamsLink</a></td><td class=SDescription>Class for links in an ActivityStreams JSON Activity.</td></tr><tr class="SClass"><td class=SEntry><a href="#ActivityStreamsLink" >ActivityStreamsLink</a></td><td class=SDescription>Class for links in an ActivityStreams JSON Activity.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ActivityStreamsLink.__construct" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">__construct</a></td><td class=SDescription>Class constructor</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#ActivityStreamsLink.asArray" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">asArray</a></td><td class=SDescription>Return the link dictionary as an array</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CSection"><div class=CTopic><h2 class=CTitle><a name="ActivityStreamsLink"></a>ActivityStreamsLink</h2><div class=CBody><p>Class for links in an ActivityStreams JSON Activity.</p><h4 class=CHeading>postActiv</h4><p>the micro-blogging software</p><h4 class=CHeading>Copyright</h4><p>Copyright &copy; 2016, Maiyannah Bishop</p><h4 class=CHeading>Derived from code copyright various sources</h4><ul><li>GNU Social &copy; 2013-2016, Free Software Foundation, Inc</li><li>StatusNet &copy; 2008-2012, StatusNet, Inc</li></ul><h4 class=CHeading>License</h4><p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p><p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&nbsp; See the GNU Affero General Public License for more details.</p><p>You should have received a copy of the GNU Affero General Public License along with this program.&nbsp; If not, see <a href="http://www.gnu.org/licenses/" class=LURL target=_top>http://www.gnu.org/licenses/</a>.</p><p><a href="https://www.gnu.org/licenses/agpl.html" class=LURL target=_top>https://www.gnu.org/licenses/agpl.html</a></p><h4 class=CHeading>About</h4><p>A class for representing links in JSON Activities</p><h4 class=CHeading>PHP version</h4><p>Tested with PHP 5.6</p><h4 class=CHeading>File Authors</h4><ul><li>Mikael Nordfeldth <a href="#" onClick="location.href='mai' + 'lto:' + 'm' + 'mn' + '@' + 'hetha' + 'ne.se'; return false;" class=LEMail>m<span style="display: none">.nosp@m.</span>mn<span>@</span>hetha<span style="display: none">.nosp@m.</span>ne.se</a></li><li>Maiyannah Bishop <a href="#" onClick="location.href='mai' + 'lto:' + 'maiyanna' + 'h.bishop' + '@' + 'postac' + 'tiv.com'; return false;" class=LEMail>maiyanna<span style="display: none">.nosp@m.</span>h.bishop<span>@</span>postac<span style="display: none">.nosp@m.</span>tiv.com</a></li></ul><h4 class=CHeading>Web</h4><ul><li>postActiv <a href="http://www.postactiv.com" class=LURL target=_top>http://www.postactiv.com</a></li><li>GNU social <a href="https://www.gnu.org/s/social/" class=LURL target=_top>https://www.gnu.org/s/social/</a></li></ul></div></div></div>
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="ActivityStreamsLink"></a>ActivityStreamsLink</h2><div class=CBody><p>Class for links in an ActivityStreams JSON Activity.</p><h4 class=CHeading>Variables</h4><ul><li>linkDict</li></ul><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SFunction"><td class=SEntry><a href="#ActivityStreamsLink.__construct" id=link3 onMouseOver="ShowTip(event, 'tt1', 'link3')" onMouseOut="HideTip('tt1')">__construct</a></td><td class=SDescription>Class constructor</td></tr><tr class="SFunction SMarked"><td class=SEntry><a href="#ActivityStreamsLink.asArray" id=link4 onMouseOver="ShowTip(event, 'tt2', 'link4')" onMouseOut="HideTip('tt2')">asArray</a></td><td class=SDescription>Return the link dictionary as an array</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ActivityStreamsLink.__construct"></a>__construct</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function __construct(</td><td class=PParameter nowrap>$url</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PParameter nowrap>$rel</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PParameter nowrap>$mediaType</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Class constructor</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ActivityStreamsLink.asArray"></a>asArray</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function asArray()</td></tr></table></blockquote><p>Return the link dictionary as an array</p></div></div></div>
</div><!--Content-->
<!--START_ND_TOOLTIPS-->
<!--END_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function __construct(</td><td class=PParameter nowrap>$url</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PParameter nowrap>$rel</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PParameter nowrap>$mediaType</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Class constructor</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>function asArray()</td></tr></table></blockquote>Return the link dictionary as an array</div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
\ No newline at end of file
This diff could not be displayed because it is too large.
var indexSectionsWithContent = {
"Functions": {
"General": {
"Symbols": true,
"Numbers": false,
"A": true,
......@@ -26,40 +26,40 @@ var indexSectionsWithContent = {
"V": true,
"W": false,
"X": false,
"Y": false,
"Y": true,
"Z": false
},
"Variables": {
"Symbols": true,
"Files": {
"Symbols": false,
"Numbers": false,
"A": false,
"A": true,
"B": false,
"C": false,
"D": false,
"D": true,
"E": false,
"F": false,
"G": false,
"H": false,
"I": false,
"J": false,
"I": true,
"J": true,
"K": false,
"L": false,
"L": true,
"M": false,
"N": false,
"O": false,
"P": false,
"Q": false,
"R": false,
"S": false,
"P": true,
"Q": true,
"R": true,
"S": true,
"T": false,
"U": false,
"U": true,
"V": false,
"W": false,
"X": false,
"Y": false,
"Y": true,
"Z": false
},
"General": {
"Functions": {
"Symbols": true,
"Numbers": false,
"A": true,
......@@ -86,62 +86,62 @@ var indexSectionsWithContent = {
"V": true,
"W": false,
"X": false,
"Y": true,
"Y": false,
"Z": false
},
"Classes": {
"Symbols": false,
"Variables": {
"Symbols": true,
"Numbers": false,
"A": false,
"B": false,
"C": false,
"D": true,
"D": false,
"E": false,
"F": false,
"G": false,
"H": true,
"I": true,
"H": false,
"I": false,
"J": false,
"K": false,
"L": true,
"L": false,
"M": false,
"N": false,
"O": false,
"P": true,
"P": false,
"Q": false,
"R": true,
"S": true,
"T": true,
"U": true,
"R": false,
"S": false,
"T": false,
"U": false,
"V": false,
"W": false,
"X": false,
"Y": true,
"Y": false,
"Z": false
},
"Files": {
"Classes": {
"Symbols": false,
"Numbers": false,
"A": true,
"A": false,
"B": false,
"C": false,
"D": true,
"E": false,
"F": false,
"G": false,
"H": false,
"H": true,
"I": true,
"J": true,
"J": false,
"K": false,
"L": true,
"M": false,
"N": false,
"O": false,
"P": true,
"Q": true,
"Q": false,
"R": true,
"S": true,
"T": false,
"T": true,
"U": true,
"V": false,
"W": false,
......
......@@ -14,7 +14,7 @@ if (browserType) {document.write("<div class=" + browserType + ">");if (browserV
<div id=Index><div class=IPageTitle>Search Results</div><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_ack><div class=IEntry><a href="../files/classes/queue/StompQueueManager-php.html#StompQueueManager.ack" class=ISymbol>ack</a>, <span class=IParent>StompQueueManager</span></div></div><div class=SRResult id=SR_addItemFromNotice><div class=IEntry><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#addItemFromNotice" class=ISymbol>addItemFromNotice</a></div></div><div class=SRResult id=SR_addItemsFromNotices><div class=IEntry><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#addItemsFromNotices" class=ISymbol>addItemsFromNotices</a></div></div><div class=SRResult id=SR_addLink><div class=IEntry><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#addLink" class=ISymbol>addLink</a></div></div><div class=SRResult id=SR_age><div class=IEntry><a href="../files/classes/queue/RedisQueue-php.html#RedisQueueItem.age" class=ISymbol>age</a>, <span class=IParent>RedisQueueItem</span></div></div><div class=SRResult id=SR_asArray><div class=IEntry><a href="javascript:searchResults.Toggle('SR_asArray')" class=ISymbol>asArray</a><div class=ISubIndex><a href="../files/classes/activity/Activity-php.html#Activity.asArray" class=IParent>Activity</a><a href="../files/classes/activity/ActivityContext-php.html#ActivityContext.asArray" class=IParent>ActivityContext</a></div></div></div><div class=SRResult id=SR_asString><div class=IEntry><a href="javascript:searchResults.Toggle('SR_asString')" class=ISymbol>asString</a><div class=ISubIndex><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#asString" class=IParent>Global</a><a href="../files/classes/activity/Activity-php.html#Activity.asString" class=IParent>Activity</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
<div id=Index><div class=IPageTitle>Search Results</div><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_ack><div class=IEntry><a href="../files/classes/queue/StompQueueManager-php.html#StompQueueManager.ack" class=ISymbol>ack</a>, <span class=IParent>StompQueueManager</span></div></div><div class=SRResult id=SR_addItemFromNotice><div class=IEntry><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#addItemFromNotice" class=ISymbol>addItemFromNotice</a></div></div><div class=SRResult id=SR_addItemsFromNotices><div class=IEntry><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#addItemsFromNotices" class=ISymbol>addItemsFromNotices</a></div></div><div class=SRResult id=SR_addLink><div class=IEntry><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#addLink" class=ISymbol>addLink</a></div></div><div class=SRResult id=SR_age><div class=IEntry><a href="../files/classes/queue/RedisQueue-php.html#RedisQueueItem.age" class=ISymbol>age</a>, <span class=IParent>RedisQueueItem</span></div></div><div class=SRResult id=SR_asArray><div class=IEntry><a href="javascript:searchResults.Toggle('SR_asArray')" class=ISymbol>asArray</a><div class=ISubIndex><a href="../files/classes/activity/Activity-php.html#Activity.asArray" class=IParent>Activity</a><a href="../files/classes/activity/ActivityContext-php.html#ActivityContext.asArray" class=IParent>ActivityContext</a><a href="../files/classes/activity/ActivityStreamsLink-php.html#ActivityStreamsLink.asArray" class=IParent>ActivityStreamsLink</a></div></div></div><div class=SRResult id=SR_asString><div class=IEntry><a href="javascript:searchResults.Toggle('SR_asString')" class=ISymbol>asString</a><div class=ISubIndex><a href="../files/classes/activity/ActivityStreamJSONDocument-php.html#asString" class=IParent>Global</a><a href="../files/classes/activity/Activity-php.html#Activity.asString" class=IParent>Activity</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults", "FramedHTML");
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!