PHP Class Chora, horde

Copyright 2000-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Anil Madhavapeddy ([email protected])
Author: Michael Slusarz ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$fdcache string Cached data for formatDate().
$restricted array Cached data for isRestricted().
$rtcache array Cached data for readableTime().

Méthodes publiques

Méthode Description
checkPerms ( $key ) TODO
fatal ( string $message, string $code = null ) Output an error page.
formInputs ( ) : string Generates hidden form fields with all required parameters.
formatDate ( integer $date ) : string Return formatted date information.
formatLogMessage ( string $log ) : string Formats a log message.
getAuthorEmail ( $name )
getFileViews ( string $where, string $rev ) : array Generate the link used for various file views.
getHistoryViews ( string $where ) : array Generate the link used for various history views.
getTags ( Horde_Vcs_Log $lg, string $where ) : array Return a list of tags for a given log entry.
header ( string $title ) Generates and prints the page header.
isRestricted ( string $where ) : boolean Check if the given item is restricted from being shown.
pretty ( string $mime_type, resource $fp ) : mixed Pretty-print the checked out copy, using Horde_Mime_Viewer.
readableTime ( integer $date, boolean $long = false ) : string Return a text description of how long its been since the file has been last modified.
showAuthorName ( string $name, $fullname = false ) : string Convert a commit-name into whatever the user wants.
sourceroots ( ) : array Returns the entries of $sourceroots that the current user has access to.
url ( string $script, string $uri = '', array $args = [], string $anchor = '' ) : string Generate a URL that links into Chora.
whereMenu ( string $where, string $onb = null ) : string Create the breadcrumb directory listing.

Méthodes protégées

Méthode Description
_getArgList ( $acts, $defaultActs, $args ) TODO

Method Details

_getArgList() protected static méthode

TODO
protected static _getArgList ( $acts, $defaultActs, $args )

checkPerms() public static méthode

TODO
public static checkPerms ( $key )

fatal() public static méthode

Output an error page.
public static fatal ( string $message, string $code = null )
$message string The verbose error message to be displayed.
$code string The HTTP error number (and optional text), for sending 404s or other codes if appropriate.

formInputs() public static méthode

Generates hidden form fields with all required parameters.
public static formInputs ( ) : string
Résultat string The form fields, with session information if necessary.

formatDate() public static méthode

Return formatted date information.
public static formatDate ( integer $date ) : string
$date integer Number of seconds since epoch we wish to display.
Résultat string The date formatted pursuant to Horde prefs.

formatLogMessage() public static méthode

Formats a log message.
public static formatLogMessage ( string $log ) : string
$log string The log message text.
Résultat string The formatted message.

getAuthorEmail() public static méthode

public static getAuthorEmail ( $name )

getFileViews() public static méthode

Generate the link used for various file views.
public static getFileViews ( string $where, string $rev ) : array
$where string The current file path.
$rev string The current revision.
Résultat array An array of file view links.

getHistoryViews() public static méthode

Generate the link used for various history views.
public static getHistoryViews ( string $where ) : array
$where string The current file path.
Résultat array An array of file view links.

getTags() public static méthode

Return a list of tags for a given log entry.
public static getTags ( Horde_Vcs_Log $lg, string $where ) : array
$lg Horde_Vcs_Log The Horde_Vcs_Log object.
$where string The current filepath.
Résultat array An array of linked tags.

header() public static méthode

Generates and prints the page header.
public static header ( string $title )
$title string The page title.

isRestricted() public static méthode

Check if the given item is restricted from being shown.
public static isRestricted ( string $where ) : boolean
$where string The current file path.
Résultat boolean Is item allowed to be displayed?

pretty() public static méthode

Pretty-print the checked out copy, using Horde_Mime_Viewer.
public static pretty ( string $mime_type, resource $fp ) : mixed
$mime_type string File extension of the checked out file.
$fp resource File pointer to the head of the checked out copy.
Résultat mixed The Horde_Mime_Viewer object which can be rendered or false on failure.

readableTime() public static méthode

Return a text description of how long its been since the file has been last modified.
public static readableTime ( integer $date, boolean $long = false ) : string
$date integer Number of seconds since epoch we wish to display.
$long boolean If true, display a more verbose date.
Résultat string The human-readable date.

showAuthorName() public static méthode

Convert a commit-name into whatever the user wants.
public static showAuthorName ( string $name, $fullname = false ) : string
$name string Account name.
Résultat string The transformed name.

sourceroots() public static méthode

Returns the entries of $sourceroots that the current user has access to.
public static sourceroots ( ) : array
Résultat array The sourceroots that the current user has access to.

url() public static méthode

Generate a URL that links into Chora.
public static url ( string $script, string $uri = '', array $args = [], string $anchor = '' ) : string
$script string Name of the Chora script to link into.
$uri string The path being browsed.
$args array Key/value pair of any GET parameters to append.
$anchor string Anchor entity name.
Résultat string The URL, with session information if necessary.

whereMenu() public static méthode

Create the breadcrumb directory listing.
public static whereMenu ( string $where, string $onb = null ) : string
$where string The current filepath.
$onb string If not null, the branch to add to the generated URLs.
Résultat string The directory string.

Property Details

$fdcache public_oe static_oe property

Cached data for formatDate().
public static string $fdcache
Résultat string

$restricted public_oe static_oe property

Cached data for isRestricted().
public static array $restricted
Résultat array

$rtcache public_oe static_oe property

Cached data for readableTime().
public static array $rtcache
Résultat array