PHP Класс Horde_Data_Base, horde

Автор: Jan Schneider ([email protected])
Автор: Chuck Hagenbuch ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$storage Horde_Data_Storage Storage object.

Защищенные свойства (Protected)

Свойство Тип Описание
$_browser Horde_Browser Browser object.
$_cleanupCallback callback Cleanup callback function.
$_contentType string MIME content type.
$_extension string File extension.
$_http Horde_Http_Client HTTP client object.
$_vars Horde_Variables Variables object.
$_warnings array A list of warnings raised during the last operation.

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

Метод Описание
__construct ( Horde_Data_Storage $storage, array $params = [] ) Constructor.
cleanup ( ) : mixed Removes any uploaded and moved files.
exportData ( $data, $method = 'REQUEST' ) Stub to return exported data.
exportFile ( $filename, $data ) Stub to export data to a file.
getContentType ( ) : string Returns the content type.
getFilename ( string $basename ) : string Returns the full filename including the basename and extension.
getNewline ( ) : string Tries to determine the expected newline character based on the platform information passed by the browser's agent header.
importData ( $text ) Stub to import passed data.
importFile ( $filename, $header = false ) Imports a file.
importUrl ( $url, $header = false ) Imports a URL.
nextStep ( integer $action, array $param = [] ) : mixed Takes all necessary actions for the given import step, parameters and form values and returns the next necessary step.
warnings ( ) : array Returns a list of warnings that have been raised during the last operation.

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

Метод Описание
_mapDate ( string $date, string $type, array $params, integer $key ) : string Maps a date/time string to an associative array.

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

__construct() публичный Метод

Constructor.
public __construct ( Horde_Data_Storage $storage, array $params = [] )
$storage Horde_Data_Storage
$params array Optional parameters: - browser: (Horde_Browser) A browser object. - http: (Horde_Http_Client) A HTTP client object. - cleanup: (callback) A callback to call at cleanup time. - vars: (Horde_Variables) Form data.

_mapDate() защищенный Метод

Maps a date/time string to an associative array.
protected _mapDate ( string $date, string $type, array $params, integer $key ) : string
$date string The date.
$type string One of 'date', 'time' or 'datetime'.
$params array Two-dimensional array with additional information about the formatting. Possible keys are: - delimiter: The character that seperates the different date/time parts. - format: If 'ampm' and $date contains a time we assume that it is in AM/PM format. - order: If $type is 'datetime' the order of the day and time parts: -1 (timestamp), 0 (day/time), 1 (time/day).
$key integer The key to use for $params.
Результат string The date or time in ISO format.

cleanup() публичный Метод

Removes any uploaded and moved files.
public cleanup ( ) : mixed
Результат mixed If callback called, the return value of this call. This should be the value of the first import step.

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

Stub to return exported data.
abstract public exportData ( $data, $method = 'REQUEST' )

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

Stub to export data to a file.
abstract public exportFile ( $filename, $data )

getContentType() публичный Метод

Returns the content type.
public getContentType ( ) : string
Результат string The content type.

getFilename() публичный Метод

Returns the full filename including the basename and extension.
public getFilename ( string $basename ) : string
$basename string Basename for the file.
Результат string The file name.

getNewline() публичный Метод

Tries to determine the expected newline character based on the platform information passed by the browser's agent header.
public getNewline ( ) : string
Результат string The guessed expected newline characters, either \n, \r or \r\n.

importData() публичный Метод

Stub to import passed data.
public importData ( $text )

importFile() публичный Метод

Imports a file.
public importFile ( $filename, $header = false )

importUrl() публичный Метод

Imports a URL.
С версии: 2.1.0
public importUrl ( $url, $header = false )

nextStep() публичный Метод

Takes all necessary actions for the given import step, parameters and form values and returns the next necessary step.
public nextStep ( integer $action, array $param = [] ) : mixed
$action integer The current step. One of the IMPORT_* constants.
$param array An associative array containing needed parameters for the current step.
Результат mixed Either the next step as an integer constant or imported data set after the final step.

warnings() публичный Метод

Returns a list of warnings that have been raised during the last operation.
public warnings ( ) : array
Результат array A (possibly empty) list of warnings.

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

$_browser защищенное свойство

Browser object.
protected Horde_Browser $_browser
Результат Horde_Browser

$_cleanupCallback защищенное свойство

Cleanup callback function.
protected callback $_cleanupCallback
Результат callback

$_contentType защищенное свойство

MIME content type.
protected string $_contentType
Результат string

$_extension защищенное свойство

File extension.
protected string $_extension
Результат string

$_http защищенное свойство

HTTP client object.
protected Horde_Http_Client $_http
Результат Horde_Http_Client

$_vars защищенное свойство

Variables object.
protected Horde_Variables $_vars
Результат Horde_Variables

$_warnings защищенное свойство

A list of warnings raised during the last operation.
protected array $_warnings
Результат array

$storage публичное свойство

Storage object.
public Horde_Data_Storage $storage
Результат Horde_Data_Storage