PHP 클래스 Horde_Data_Base, horde

저자: Jan Schneider ([email protected])
저자: Chuck Hagenbuch ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$storage Horde_Data_Storage Storage object.

보호된 프로퍼티들

프로퍼티 타입 설명
$_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