Commit 53852bc6 by Maiyannah Bishop

ActivityStreamsMediaLink documentation

1 parent ac3ebfd2
......@@ -50,34 +50,50 @@
if (!defined('POSTACTIV')) { exit(1); }
// ----------------------------------------------------------------------------
// Class: ActivityStreamsMediaLink
// Class for media links in an ActivityStreams JSON Activity.
class ActivityStreamsMediaLink extends ActivityStreamsLink
{
private $linkDict;
private $linkDict;
function __construct(
// ------------------------------------------------------------------------
// Function: __construct
// Class constructor
//
// Parameters:
// o url
// o width
// o height
// o mediaType
// o rel
// o duration
function __construct(
$url = null,
$width = null,
$height = null,
$mediaType = null, // extension
$rel = null, // extension
$duration = null
)
{
parent::__construct($url, $rel, $mediaType);
$this->linkDict = array(
'width' => intval($width),
'height' => intval($height),
'duration' => intval($duration)
);
}
$duration = null) {
parent::__construct($url, $rel, $mediaType);
$this->linkDict = array(
'width' => intval($width),
'height' => intval($height),
'duration' => intval($duration));
}
function asArray()
{
return array_merge(
parent::asArray(),
array_filter($this->linkDict)
);
}
// ------------------------------------------------------------------------
// Function: asArray
// Return the class as an array suitable for JSON
//
// Returns:
// o array
function asArray() {
return array_merge(parent::asArray(), array_filter($this->linkDict));
}
}
// END OF FILE
......
......@@ -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="ActivityStreamsMediaLink.php"></a>ActivityStreamsMediaLink.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="#ActivityStreamsMediaLink.php" >ActivityStreamsMediaLink.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 media 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="ActivityStreamsMediaLink.php"></a>ActivityStreamsMediaLink.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="#ActivityStreamsMediaLink.php" >ActivityStreamsMediaLink.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 media links in an ActivityStreams JSON Activity.</td></tr><tr class="SClass"><td class=SEntry><a href="#ActivityStreamsMediaLink" >ActivityStreamsMediaLink</a></td><td class=SDescription>Class for media links in an ActivityStreams JSON Activity.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#ActivityStreamsMediaLink.__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="#ActivityStreamsMediaLink.asArray" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">asArray</a></td><td class=SDescription>Return the class as an array suitable for JSON</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 media 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 MediaLinks 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="ActivityStreamsMediaLink"></a>ActivityStreamsMediaLink</h2><div class=CBody><p>Class for media links in an ActivityStreams JSON Activity.</p><!--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="#ActivityStreamsMediaLink.__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="#ActivityStreamsMediaLink.asArray" id=link4 onMouseOver="ShowTip(event, 'tt2', 'link4')" onMouseOut="HideTip('tt2')">asArray</a></td><td class=SDescription>Return the class as an array suitable for JSON</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ActivityStreamsMediaLink.__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=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</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=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>$width</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>$height</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>$mediaType</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PTypePrefix nowrap>//&nbsp;</td><td class=PType nowrap>extension&nbsp;</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=PTypePrefix nowrap>//&nbsp;</td><td class=PType nowrap>extension&nbsp;</td><td class=PParameter nowrap>$duration</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><h4 class=CHeading>Parameters</h4><ul><li>url</li><li>width</li><li>height</li><li>mediaType</li><li>rel</li><li>duration</li></ul></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="ActivityStreamsMediaLink.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 class as an array suitable for JSON</p><h4 class=CHeading>Returns</h4><ul><li>array</li></ul></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=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</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=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>$width</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>$height</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PTypePrefix nowrap></td><td class=PType nowrap>&nbsp;</td><td class=PParameter nowrap>$mediaType</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%> null,</td></tr><tr><td></td><td class=PTypePrefix nowrap>//&nbsp;</td><td class=PType nowrap>extension&nbsp;</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=PTypePrefix nowrap>//&nbsp;</td><td class=PType nowrap>extension&nbsp;</td><td class=PParameter nowrap>$duration</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 class as an array suitable for JSON</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
var indexSectionsWithContent = {
"Classes": {
"Symbols": false,
"General": {
"Symbols": true,
"Numbers": false,
"A": false,
"B": false,
"C": false,
"A": true,
"B": true,
"C": true,
"D": true,
"E": false,
"F": false,
"G": false,
"E": true,
"F": true,
"G": true,
"H": true,
"I": true,
"J": false,
"J": true,
"K": false,
"L": true,
"M": false,
"N": false,
"O": false,
"M": true,
"N": true,
"O": true,
"P": true,
"Q": false,
"Q": true,
"R": true,
"S": true,
"T": true,
"U": true,
"V": false,
"V": true,
"W": false,
"X": false,
"Y": true,
"Z": false
},
"General": {
"Functions": {
"Symbols": true,
"Numbers": false,
"A": true,
......@@ -56,7 +56,7 @@ var indexSectionsWithContent = {
"V": true,
"W": false,
"X": false,
"Y": true,
"Y": false,
"Z": false
},
"Variables": {
......@@ -89,37 +89,37 @@ var indexSectionsWithContent = {
"Y": false,
"Z": false
},
"Functions": {
"Symbols": true,
"Files": {
"Symbols": false,
"Numbers": false,
"A": true,
"B": true,
"C": true,
"B": false,
"C": false,
"D": true,
"E": true,
"F": true,
"G": true,
"H": true,
"E": false,
"F": false,
"G": false,
"H": false,
"I": true,
"J": true,
"K": false,
"L": true,
"M": true,
"N": true,
"O": true,
"M": false,
"N": false,
"O": false,
"P": true,
"Q": true,
"R": true,
"S": true,
"T": true,
"T": false,
"U": true,
"V": true,
"V": false,
"W": false,
"X": false,
"Y": false,
"Y": true,
"Z": false
},
"Files": {
"Classes": {
"Symbols": false,
"Numbers": false,
"A": true,
......@@ -129,19 +129,19 @@ var indexSectionsWithContent = {
"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,
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="FramedSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.4 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<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_ActivityStreamsMediaLink><div class=IEntry><a href="../files/classes/activity/ActivityStreamsMediaLink-php.html#ActivityStreamsMediaLink" class=ISymbol>ActivityStreamsMediaLink</a></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");
searchResults.Search();
--></script></div><!--Index-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
\ No newline at end of file
......@@ -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><a href="../files/classes/activity/ActivityObject-php.html#ActivityObject.asArray" class=IParent>ActivityObject</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><a href="../files/classes/activity/ActivityObject-php.html#ActivityObject.asString" class=IParent>ActivityObject</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/ActivityObject-php.html#ActivityObject.asArray" class=IParent>ActivityObject</a><a href="../files/classes/activity/ActivityStreamsLink-php.html#ActivityStreamsLink.asArray" class=IParent>ActivityStreamsLink</a><a href="../files/classes/activity/ActivityStreamsMediaLink-php.html#ActivityStreamsMediaLink.asArray" class=IParent>ActivityStreamsMediaLink</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><a href="../files/classes/activity/ActivityObject-php.html#ActivityObject.asString" class=IParent>ActivityObject</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");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!