Permalink
Browse files

Adds @uses tags to enrich documentation.

  • Loading branch information...
1 parent b06ac45 commit 9f1625c48a75c70718122a794c2fb1f767a3d790 Jim Safley committed May 14, 2011
Showing with 33 additions and 1 deletion.
  1. +12 −0 lib/Scripto.php
  2. +21 −1 lib/Scripto/Document.php
View
@@ -78,6 +78,7 @@ public function __construct(Scripto_Adapter_Interface $adapter, $mediawiki)
/**
* Check whether the specified document exists in the external system.
*
+ * @uses Scripto_Adapter_Interface::documentExists()
* @param string|int $id The unique document identifier.
* @return bool
*/
@@ -93,6 +94,7 @@ public function documentExists($id)
/**
* Get a Scripto_Document object.
*
+ * @see Scripto_Document
* @param string|int $id The unique document identifier.
* @return Scripto_Document
*/
@@ -108,6 +110,7 @@ public function getDocument($id)
* It is possible to restrict account creation in MediaWiki.
* @link http://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_account_creation
*
+ * @uses Scripto_Service_MediaWiki::login()
* @param string $username
* @param string $password
*/
@@ -119,6 +122,8 @@ public function login($username, $password)
/**
* Logout via the MediaWiki service.
+ *
+ * @uses Scripto_Service_MediaWiki::logout()
*/
public function logout()
{
@@ -174,6 +179,8 @@ public function canProtect()
* Under normal circumstances calling this method directly is unnecessary,
* but is helpful when authenticating after construction and when a login is
* not called, like when hijacking cookies for command line authentication.
+ *
+ * @uses Scripto_Service_MediaWiki::getUserInfo()
*/
public function setUserInfo()
{
@@ -193,6 +200,7 @@ public function getUserName()
/**
* Get the current user's most recently contributed document pages.
*
+ * @uses Scripto_Service_MediaWiki::getUserContributions()
* @param int $limit The number of document pages to return.
* @return array
*/
@@ -274,6 +282,7 @@ public function getUserDocumentPages($limit = 10)
* Get the recent changes.
*
* @link http://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces
+ * @uses Scripto_Service_MediaWiki::getRecentChanges()
* @param int $limit The number of recent changes to return.
* @return array
*/
@@ -370,6 +379,7 @@ public function getRecentChanges($limit = 10)
/**
* Get the difference between two page revisions.
*
+ * @uses Scripto_Service_MediaWiki::getRevisionDiff()
* @param int $from The revision ID from which to diff.
* @param int|string $to The revision to which to diff. Use the revision ID,
* "prev", "next", or "cur".
@@ -383,6 +393,7 @@ public function getRevisionDiff($fromRevisionId, $toRevisionId = 'prev')
/**
* Get properties of the specified page revision.
*
+ * @uses Scripto_Service_MediaWiki::getRevisions()
* @param int $revisionId
* @return array
*/
@@ -415,6 +426,7 @@ public function getRevision($revisionId)
/**
* Determine whether the provided MediaWiki API URL is valid.
*
+ * @uses Scripto_Service_MediaWiki::isValidApiUrl()
* @param string $apiUrl
* @return bool
*/
View
@@ -11,7 +11,7 @@
require_once 'Scripto.php';
/**
- * R@see Scripto_Exception.
+ * @see Scripto_Exception.
*/
require_once 'Scripto/Exception.php';
@@ -214,6 +214,7 @@ public function getTalkPageInfo()
/**
* Get all of this document's pages from the adapter.
*
+ * @uses Scripto_Adapter_Interface::getDocumentPages()
* @return array
*/
public function getPages()
@@ -224,6 +225,7 @@ public function getPages()
/**
* Get this document's first page ID from the adapter.
*
+ * @uses Scripto_Adapter_Interface::getDocumentFirstPageId()
* @return array
*/
public function getFirstPageId()
@@ -234,6 +236,7 @@ public function getFirstPageId()
/**
* Get this document's current page image URL from the adapter.
*
+ * @uses Scripto_Adapter_Interface::getDocumentPageImageUrl()
* @return string
*/
public function getPageImageUrl()
@@ -247,6 +250,7 @@ public function getPageImageUrl()
/**
* Get the MediaWiki transcription page wikitext for the current page.
*
+ * @uses Scripto_Service_MediaWiki::getLatestRevisionWikitext()
* @return string The transcription wikitext.
*/
public function getTranscriptionPageWikitext()
@@ -260,6 +264,7 @@ public function getTranscriptionPageWikitext()
/**
* Get the MediaWiki talk page wikitext for the current page.
*
+ * @uses Scripto_Service_MediaWiki::getLatestRevisionWikitext()
* @return string The talk wikitext.
*/
public function getTalkPageWikitext()
@@ -273,6 +278,7 @@ public function getTalkPageWikitext()
/**
* Get the MediaWiki transcription page HTML for the current page.
*
+ * @uses Scripto_Service_MediaWiki::getLatestRevisionHtml()
* @return string The transcription HTML.
*/
public function getTranscriptionPageHtml()
@@ -286,6 +292,7 @@ public function getTranscriptionPageHtml()
/**
* Get the MediaWiki talk page HTML for the current page.
*
+ * @uses Scripto_Service_MediaWiki::getLatestRevisionHtml()
* @return string The talk HTML.
*/
public function getTalkPageHtml()
@@ -299,6 +306,7 @@ public function getTalkPageHtml()
/**
* Get the MediaWiki transcription page plain text for the current page.
*
+ * @uses Scripto_Service_MediaWiki::getLatestRevisionHtml()
* @return string The transcription page plain text.
*/
public function getTranscriptionPagePlainText()
@@ -312,6 +320,7 @@ public function getTranscriptionPagePlainText()
/**
* Get the MediaWiki talk plain text for the current page.
*
+ * @uses Scripto_Service_MediaWiki::getLatestRevisionHtml()
* @return string The talk plain text.
*/
public function getTalkPagePlainText()
@@ -381,6 +390,7 @@ public function canEditTalkPage()
/**
* Edit the MediaWiki transcription page for the current document.
*
+ * @uses Scripto_Service_MediaWiki::edit()
* @param string $text The wikitext of the transcription.
*/
public function editTranscriptionPage($text)
@@ -396,6 +406,7 @@ public function editTranscriptionPage($text)
/**
* Edit the MediaWiki talk page for the current document.
*
+ * @uses Scripto_Service_MediaWiki::edit()
* @param string $text The wikitext of the transcription.
*/
public function editTalkPage($text)
@@ -470,6 +481,7 @@ public function isProtectedTalkPage()
* Determine whether all of this document's transcription pages were already
* exported to the external system.
*
+ * @uses Scripto_Adapter_Interface::documentTranscriptionIsImported()
* @return bool
*/
public function isExported()
@@ -481,6 +493,7 @@ public function isExported()
* Determine whether the current transcription page was already exported to
* the external system.
*
+ * @uses Scripto_Adapter_Interface::documentPageTranscriptionIsImported()
* @return bool
*/
public function isExportedPage()
@@ -495,6 +508,7 @@ public function isExportedPage()
* Export the document page transcription to the external system by calling
* the adapter.
*
+ * @uses Scripto_Adapter_Interface::importDocumentPageTranscription()
* @param string $type The type of text to set, valid options are
* plain_text, html, and wikitext.
*/
@@ -522,6 +536,7 @@ public function exportPage($type = 'plain_text')
* Export the entire document transcription to the external system by
* calling the adapter.
*
+ * @uses Scripto_Adapter_Interface::importDocumentTranscription()
* @param string $type The type of text to set, valid options are
* plain_text, html, and wikitext.
* @param string $pageDelimiter The delimiter used to stitch pages together.
@@ -555,6 +570,7 @@ public function export($type = 'plain_text', $pageDelimiter = "\n")
* It is possible to restrict anonymous editing in MediaWiki.
* @link http://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_editing_of_all_pages
*
+ * @uses Scripto_Service_MediaWiki::getUserInfo()
* @param array $pageProtections
* @return bool
*/
@@ -622,6 +638,7 @@ protected function _isProtectedPage(array $pageProtections)
/**
* Protect the specified page.
*
+ * @uses Scripto_Service_MediaWiki::protect()
* @param string $title
* @param string $protectToken
*/
@@ -638,6 +655,7 @@ protected function _protectPage($title, $protectToken)
/**
* Unprotect the specified page.
*
+ * @uses Scripto_Service_MediaWiki::protect()
* @param string $title
* @param string $protectToken
*/
@@ -654,6 +672,7 @@ protected function _unprotectPage($title, $protectToken)
/**
* Get information for the specified page.
*
+ * @uses Scripto_Service_MediaWiki::getInfo()
* @param string $title
* @return array
*/
@@ -686,6 +705,7 @@ protected function _getPageInfo($title)
/**
* Get the revisions for the specified page.
*
+ * @uses Scripto_Service_MediaWiki::getRevisions()
* @param string $title
* @param int $limit
* @param int $startRevisionId

0 comments on commit 9f1625c

Please sign in to comment.