PHP Class Horde_Data_Base, horde

Author: Jan Schneider ([email protected])
Author: Chuck Hagenbuch ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$storage Horde_Data_Storage Storage object.

Protected Properties

Свойство Type Description
$_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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
_mapDate ( string $date, string $type, array $params, integer $key ) : string Maps a date/time string to an associative array.

Method Details

__construct() public méthode

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() protected méthode

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.
Résultat string The date or time in ISO format.

cleanup() public méthode

Removes any uploaded and moved files.
public cleanup ( ) : mixed
Résultat mixed If callback called, the return value of this call. This should be the value of the first import step.

exportData() abstract public méthode

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

exportFile() abstract public méthode

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

getContentType() public méthode

Returns the content type.
public getContentType ( ) : string
Résultat string The content type.

getFilename() public méthode

Returns the full filename including the basename and extension.
public getFilename ( string $basename ) : string
$basename string Basename for the file.
Résultat string The file name.

getNewline() public méthode

Tries to determine the expected newline character based on the platform information passed by the browser's agent header.
public getNewline ( ) : string
Résultat string The guessed expected newline characters, either \n, \r or \r\n.

importData() public méthode

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

importFile() public méthode

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

importUrl() public méthode

Imports a URL.
Since: 2.1.0
public importUrl ( $url, $header = false )

nextStep() public méthode

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.
Résultat mixed Either the next step as an integer constant or imported data set after the final step.

warnings() public méthode

Returns a list of warnings that have been raised during the last operation.
public warnings ( ) : array
Résultat array A (possibly empty) list of warnings.

Property Details

$_browser protected_oe property

Browser object.
protected Horde_Browser $_browser
Résultat Horde_Browser

$_cleanupCallback protected_oe property

Cleanup callback function.
protected callback $_cleanupCallback
Résultat callback

$_contentType protected_oe property

MIME content type.
protected string $_contentType
Résultat string

$_extension protected_oe property

File extension.
protected string $_extension
Résultat string

$_http protected_oe property

HTTP client object.
protected Horde_Http_Client $_http
Résultat Horde_Http_Client

$_vars protected_oe property

Variables object.
protected Horde_Variables $_vars
Résultat Horde_Variables

$_warnings protected_oe property

A list of warnings raised during the last operation.
protected array $_warnings
Résultat array

$storage public_oe property

Storage object.
public Horde_Data_Storage $storage
Résultat Horde_Data_Storage