\Chora

Chora Base Class.

Copyright 2000-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Summary

Methods
Properties
Constants
header()
whereMenu()
fatal()
url()
formInputs()
checkPerms()
sourceroots()
pretty()
isRestricted()
getHistoryViews()
getFileViews()
getTags()
readableTime()
showAuthorName()
getAuthorEmail()
formatDate()
formatLogMessage()
$restricted
$rtcache
$fdcache
No constants found
_getArgList()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$restricted

$restricted : array

Cached data for isRestricted().

Type

array

$rtcache

$rtcache : array

Cached data for readableTime().

Type

array

$fdcache

$fdcache : string

Cached data for formatDate().

Type

string

Methods

header()

header(string  $title) 

Generates and prints the page header.

Parameters

string $title

The page title.

whereMenu()

whereMenu(string  $where, string  $onb = null) : string

Create the breadcrumb directory listing.

Parameters

string $where

The current filepath.

string $onb

If not null, the branch to add to the generated URLs.

Returns

string —

The directory string.

fatal()

fatal(string  $message, string  $code = null) 

Output an error page.

Parameters

string $message

The verbose error message to be displayed.

string $code

The HTTP error number (and optional text), for sending 404s or other codes if appropriate.

url()

url(string  $script, string  $uri = '', array  $args = array(), string  $anchor = '') : string

Generate a URL that links into Chora.

Parameters

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.

Returns

string —

The URL, with session information if necessary.

formInputs()

formInputs() : string

Generates hidden form fields with all required parameters.

Returns

string —

The form fields, with session information if necessary.

checkPerms()

checkPerms(  $key) 

TODO

Parameters

$key

sourceroots()

sourceroots() : array

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

Returns

array —

The sourceroots that the current user has access to.

pretty()

pretty(string  $mime_type, resource  $fp) : mixed

Pretty-print the checked out copy, using Horde_Mime_Viewer.

Parameters

string $mime_type

File extension of the checked out file.

resource $fp

File pointer to the head of the checked out copy.

Returns

mixed —

The Horde_Mime_Viewer object which can be rendered or false on failure.

isRestricted()

isRestricted(string  $where) : boolean

Check if the given item is restricted from being shown.

Parameters

string $where

The current file path.

Returns

boolean —

Is item allowed to be displayed?

getHistoryViews()

getHistoryViews(string  $where) : array

Generate the link used for various history views.

Parameters

string $where

The current file path.

Returns

array —

An array of file view links.

getFileViews()

getFileViews(string  $where, string  $rev) : array

Generate the link used for various file views.

Parameters

string $where

The current file path.

string $rev

The current revision.

Returns

array —

An array of file view links.

getTags()

getTags(\Horde_Vcs_Log  $lg, string  $where) : array

Return a list of tags for a given log entry.

Parameters

\Horde_Vcs_Log $lg

The Horde_Vcs_Log object.

string $where

The current filepath.

Returns

array —

An array of linked tags.

readableTime()

readableTime(integer  $date, boolean  $long = false) : string

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

Parameters

integer $date

Number of seconds since epoch we wish to display.

boolean $long

If true, display a more verbose date.

Returns

string —

The human-readable date.

showAuthorName()

showAuthorName(string  $name,   $fullname = false) : string

Convert a commit-name into whatever the user wants.

Parameters

string $name

Account name.

$fullname

Returns

string —

The transformed name.

getAuthorEmail()

getAuthorEmail(  $name) 

Parameters

$name

formatDate()

formatDate(integer  $date) : string

Return formatted date information.

Parameters

integer $date

Number of seconds since epoch we wish to display.

Returns

string —

The date formatted pursuant to Horde prefs.

formatLogMessage()

formatLogMessage(string  $log) : string

Formats a log message.

Parameters

string $log

The log message text.

Returns

string —

The formatted message.

_getArgList()

_getArgList(  $acts,   $defaultActs,   $args) 

TODO

Parameters

$acts
$defaultActs
$args