Class Chora

Description

Chora Base Class.

$Horde: chora/lib/Chora.php,v 1.72.6.8 2008/10/09 17:40:05 jan Exp $

Located in /lib/Chora.php (line 10)


	
			
Method Summary
 void checkError (mixed $e)
 void fatal (string $errcode, string $errmsg)
 string formatDate (integer $date)
 void formatLogMessage ( $log)
 string formInputs ([array $args = array()])
 array getBranch (VC_File $fl, string $rev)
 void getFileViews ()
 void getMenu ([ $returnType = 'object'])
 array getRevisionRange (string $r1, string $r2)
 array getTags (VC_Log_* $lg, string $where)
 void initialize ()
 boolean isRestricted ( $item)
 object The &pretty (string $mime_type, resource $fp)
 string readableTime (integer $date, [boolean $long = false])
 string repositories ()
 string showAuthorName (string $name, [ $fullname = false])
 array sourceroots ()
 string url ([string $script = ''], [string $uri = ''], [array $args = array()], [string $anchor = ''])
 void whereMenu ()
Methods
checkError (line 241)

Given a return object from a VC:: call, make sure that it's not a PEAR_Error object.

void checkError (mixed $e)
  • mixed $e: Return object from a VC:: call.
fatal (line 217)

Output an error page.

void fatal (string $errcode, string $errmsg)
  • string $errcode: The HTTP error number and text.
  • string $errmsg: The verbose error message to be displayed.
formatDate (line 628)

Return formatted date information.

  • return: The date formatted pursuant to Horde prefs.
  • since: Chora 2.1
string formatDate (integer $date)
  • integer $date: Number of seconds since epoch we wish to display.
formatLogMessage (line 522)
void formatLogMessage ( $log)
  • $log
formInputs (line 322)

Generates hidden form fields with all required parameters.

  • return: The form fields, with session information if necessary.
string formInputs ([array $args = array()])
  • array $args: Key/value pair of any POST parameters to append
getBranch (line 571)

Return branch information for a given revision.

  • return: An 2-member array - branch name and branch revision.
  • since: Chora 2.1
array getBranch (VC_File $fl, string $rev)
  • VC_File $fl: The VC_File object.
  • string $rev: The filename.
getFileViews (line 480)
void getFileViews ()
getMenu (line 464)

Build Chora's list of menu items.

void getMenu ([ $returnType = 'object'])
  • $returnType
getRevisionRange (line 594)

Create a range of revisions between two revision numbers.

  • return: The revision range, or empty if there is no straight line path between the revisions.
  • since: Chora 2.1
array getRevisionRange (string $r1, string $r2)
  • string $r1: The initial revision.
  • string $r2: The ending revision.
getTags (line 547)

Return a list of tags for a given log entry.

  • return: An array of linked tags.
  • since: Chora 2.1
array getTags (VC_Log_* $lg, string $where)
  • VC_Log_* $lg: The VC_Log object.
  • string $where: The filename.
initialize (line 67)

Initialize global variables and objects.

void initialize ()
isRestricted (line 421)

Check if the given item is restricted from being shown.

  • return: whether or not the item is allowed to be displayed
boolean isRestricted ( $item)
  • $item
pretty (line 405)

Pretty-print the checked out copy, using the Horde::Mime::Viewer package.

  • return: MIME_Viewer object which can be rendered or false on failure
object The &pretty (string $mime_type, resource $fp)
  • string $mime_type: File extension of the checked out file
  • resource $fp: fp File pointer to the head of the checked out copy
readableTime (line 21)

Return a text description of how long its been since the file has been last modified.

  • return: The human-readable date.
string readableTime (integer $date, [boolean $long = false])
  • integer $date: Number of seconds since epoch we wish to display.
  • boolean $long: If true, display a more verbose date.
repositories (line 372)

Generate a list of repositories available from this installation of Chora.

  • return: XHTML code representing links to the repositories.
string repositories ()
showAuthorName (line 255)

Convert a commit-name into whatever the user wants.

  • return: The transformed name.
string showAuthorName (string $name, [ $fullname = false])
  • string $name: Account name.
  • $fullname
sourceroots (line 349)

Returns the entries of $sourceroots that the current user has access to.

  • return: The sourceroots that the current user has access to.
array sourceroots ()
url (line 280)

Generate a URL that links into Chora.

  • return: The URL, with session information if necessary.
string url ([string $script = ''], [string $uri = ''], [array $args = array()], [string $anchor = ''])
  • string $script: Name of the Chora script to link into
  • string $uri: The path being browsed.
  • array $args: Key/value pair of any GET parameters to append
  • string $anchor: Anchor entity name
whereMenu (line 187)
void whereMenu ()

Documentation generated on Sun, 30 Jan 2011 05:09:52 +0000 by phpDocumentor 1.4.3