PHP Класс 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.
Автор: Anil Madhavapeddy ([email protected])
Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$fdcache string Cached data for formatDate().
$restricted array Cached data for isRestricted().
$rtcache array Cached data for readableTime().

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
_getArgList ( $acts, $defaultActs, $args ) TODO

Описание методов

_getArgList() защищенный статический Метод

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

checkPerms() публичный статический Метод

TODO
public static checkPerms ( $key )

fatal() публичный статический Метод

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() публичный статический Метод

Generates hidden form fields with all required parameters.
public static formInputs ( ) : string
Результат string The form fields, with session information if necessary.

formatDate() публичный статический Метод

Return formatted date information.
public static formatDate ( integer $date ) : string
$date integer Number of seconds since epoch we wish to display.
Результат string The date formatted pursuant to Horde prefs.

formatLogMessage() публичный статический Метод

Formats a log message.
public static formatLogMessage ( string $log ) : string
$log string The log message text.
Результат string The formatted message.

getAuthorEmail() публичный статический Метод

public static getAuthorEmail ( $name )

getFileViews() публичный статический Метод

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.
Результат array An array of file view links.

getHistoryViews() публичный статический Метод

Generate the link used for various history views.
public static getHistoryViews ( string $where ) : array
$where string The current file path.
Результат array 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
$lg Horde_Vcs_Log The Horde_Vcs_Log object.
$where string The current filepath.
Результат array An array of linked tags.

header() публичный статический Метод

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

isRestricted() публичный статический Метод

Check if the given item is restricted from being shown.
public static isRestricted ( string $where ) : boolean
$where string The current file path.
Результат boolean 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
$mime_type string File extension of the checked out file.
$fp resource File pointer to the head of the checked out copy.
Результат 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 ( 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.
Результат string The human-readable date.

showAuthorName() публичный статический Метод

Convert a commit-name into whatever the user wants.
public static showAuthorName ( string $name, $fullname = false ) : string
$name string Account name.
Результат string The transformed name.

sourceroots() публичный статический Метод

Returns the entries of $sourceroots that the current user has access to.
public static sourceroots ( ) : array
Результат array 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 $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.
Результат string The URL, with session information if necessary.

whereMenu() публичный статический Метод

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.
Результат string The directory string.

Описание свойств

$fdcache публичное статическое свойство

Cached data for formatDate().
public static string $fdcache
Результат string

$restricted публичное статическое свойство

Cached data for isRestricted().
public static array $restricted
Результат array

$rtcache публичное статическое свойство

Cached data for readableTime().
public static array $rtcache
Результат array