Documentation

Chora
in package

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.

Tags
author

Anil Madhavapeddy avsm@horde.org

author

Michael Slusarz slusarz@horde.org

Table of Contents

$fdcache  : string
Cached data for formatDate().
$restricted  : array<string|int, mixed>
Cached data for isRestricted().
$rtcache  : array<string|int, mixed>
Cached data for readableTime().
checkPerms()  : mixed
TODO
fatal()  : mixed
Output an error page.
formatDate()  : string
Return formatted date information.
formatLogMessage()  : string
Formats a log message.
formInputs()  : string
Generates hidden form fields with all required parameters.
getAuthorEmail()  : mixed
getFileViews()  : array<string|int, mixed>
Generate the link used for various file views.
getHistoryViews()  : array<string|int, mixed>
Generate the link used for various history views.
getTags()  : array<string|int, mixed>
Return a list of tags for a given log entry.
header()  : mixed
Generates and prints the page header.
isRestricted()  : bool
Check if the given item is restricted from being shown.
pretty()  : mixed
Pretty-print the checked out copy, using Horde_Mime_Viewer.
readableTime()  : string
Return a text description of how long its been since the file has been last modified.
showAuthorName()  : string
Convert a commit-name into whatever the user wants.
sourceroots()  : array<string|int, mixed>
Returns the entries of $sourceroots that the current user has access to.
url()  : string
Generate a URL that links into Chora.
whereMenu()  : string
Create the breadcrumb directory listing.
_getArgList()  : mixed
TODO

Properties

$fdcache

Cached data for formatDate().

public static string $fdcache

$restricted

Cached data for isRestricted().

public static array<string|int, mixed> $restricted

$rtcache

Cached data for readableTime().

public static array<string|int, mixed> $rtcache

Methods

checkPerms()

TODO

public static checkPerms(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

fatal()

Output an error page.

public static fatal(string $message[, string $code = null ]) : mixed
Parameters
$message : string

The verbose error message to be displayed.

$code : string = null

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

Return values
mixed

formatDate()

Return formatted date information.

public static formatDate(int $date) : string
Parameters
$date : int

Number of seconds since epoch we wish to display.

Return values
string

The date formatted pursuant to Horde prefs.

formatLogMessage()

Formats a log message.

public static formatLogMessage(string $log) : string
Parameters
$log : string

The log message text.

Return values
string

The formatted message.

formInputs()

Generates hidden form fields with all required parameters.

public static formInputs() : string
Return values
string

The form fields, with session information if necessary.

getAuthorEmail()

public static getAuthorEmail(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

getFileViews()

Generate the link used for various file views.

public static getFileViews(string $where, string $rev) : array<string|int, mixed>
Parameters
$where : string

The current file path.

$rev : string

The current revision.

Return values
array<string|int, mixed>

An array of file view links.

getHistoryViews()

Generate the link used for various history views.

public static getHistoryViews(string $where) : array<string|int, mixed>
Parameters
$where : string

The current file path.

Return values
array<string|int, mixed>

An array of file view links.

getTags()

Return a list of tags for a given log entry.

public static getTags(Horde_Vcs_Log $lg, string $where) : array<string|int, mixed>
Parameters
$lg : Horde_Vcs_Log

The Horde_Vcs_Log object.

$where : string

The current filepath.

Return values
array<string|int, mixed>

An array of linked tags.

header()

Generates and prints the page header.

public static header(string $title) : mixed
Parameters
$title : string

The page title.

Return values
mixed

isRestricted()

Check if the given item is restricted from being shown.

public static isRestricted(string $where) : bool
Parameters
$where : string

The current file path.

Return values
bool

Is item allowed to be displayed?

pretty()

Pretty-print the checked out copy, using Horde_Mime_Viewer.

public static pretty(string $mime_type, resource $fp) : mixed
Parameters
$mime_type : string

File extension of the checked out file.

$fp : resource

File pointer to the head of the checked out copy.

Return values
mixed

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

readableTime()

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

public static readableTime(int $date[, bool $long = false ]) : string
Parameters
$date : int

Number of seconds since epoch we wish to display.

$long : bool = false

If true, display a more verbose date.

Return values
string

The human-readable date.

showAuthorName()

Convert a commit-name into whatever the user wants.

public static showAuthorName(string $name[, mixed $fullname = false ]) : string
Parameters
$name : string

Account name.

$fullname : mixed = false
Return values
string

The transformed name.

sourceroots()

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

public static sourceroots() : array<string|int, mixed>
Return values
array<string|int, mixed>

The sourceroots that the current user has access to.

url()

Generate a URL that links into Chora.

public static url(string $script[, string $uri = '' ][, array<string|int, mixed> $args = array() ][, string $anchor = '' ]) : string
Parameters
$script : string

Name of the Chora script to link into.

$uri : string = ''

The path being browsed.

$args : array<string|int, mixed> = array()

Key/value pair of any GET parameters to append.

$anchor : string = ''

Anchor entity name.

Return values
string

The URL, with session information if necessary.

whereMenu()

Create the breadcrumb directory listing.

public static whereMenu(string $where[, string $onb = null ]) : string
Parameters
$where : string

The current filepath.

$onb : string = null

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

Return values
string

The directory string.

_getArgList()

TODO

protected static _getArgList(mixed $acts, mixed $defaultActs, mixed $args) : mixed
Parameters
$acts : mixed
$defaultActs : mixed
$args : mixed
Return values
mixed

Search results