Documentation

Horde_Data_Vnote extends Horde_Data_Imc

Implement the Horde_Data:: API for vNote data.

Tags
author

Jan Schneider jan@horde.org

author

Chuck Hagenbuch chuck@horde.org

category

Horde

copyright

1999-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL

Table of Contents

$storage  : Horde_Data_Storage
Storage object.
$_browser  : Horde_Browser
Browser object.
$_cleanupCallback  : callable
Cleanup callback function.
$_contentType  : string
MIME content type.
$_extension  : string
File extension.
$_http  : Horde_Http_Client
HTTP client object.
$_iCal  : mixed
$_vars  : Horde_Variables
Variables object.
$_warnings  : array<string|int, mixed>
A list of warnings raised during the last operation.
__construct()  : mixed
Constructor.
cleanup()  : mixed
Removes any uploaded and moved files.
exportData()  : string
Exports vcalendar data as a string. Unlike vEvent, vNote data is not enclosed in BEGIN|END:vCalendar.
exportFile()  : mixed
Stub to export data to a file.
getContentType()  : string
Returns the content type.
getFilename()  : 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()  : mixed
Stub to import passed data.
importFile()  : mixed
Imports a file.
importUrl()  : mixed
Imports a URL.
nextStep()  : mixed
Takes all necessary actions for the given import step, parameters and form values and returns the next necessary step.
warnings()  : array<string|int, mixed>
Returns a list of warnings that have been raised during the last operation.
_mapDate()  : string
Maps a date/time string to an associative array.

Properties

$_browser

Browser object.

protected Horde_Browser $_browser

$_cleanupCallback

Cleanup callback function.

protected callable $_cleanupCallback

$_contentType

MIME content type.

protected string $_contentType = 'text/plain'

$_extension

File extension.

protected string $_extension = ''

$_http

HTTP client object.

protected Horde_Http_Client $_http

$_iCal

protected mixed $_iCal = alse

$_vars

Variables object.

protected Horde_Variables $_vars

$_warnings

A list of warnings raised during the last operation.

protected array<string|int, mixed> $_warnings = array()

Methods

__construct()

Constructor.

public __construct(Horde_Data_Storage $storage[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$storage : Horde_Data_Storage
$params : array<string|int, mixed> = 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.
Return values
mixed

cleanup()

Removes any uploaded and moved files.

public cleanup() : mixed
Return values
mixed

If callback called, the return value of this call. This should be the value of the first import step.

exportData()

Exports vcalendar data as a string. Unlike vEvent, vNote data is not enclosed in BEGIN|END:vCalendar.

public exportData(array<string|int, mixed> $data[, string $method = 'REQUEST' ]) : string
Parameters
$data : array<string|int, mixed>

An array containing Horde_Icalendar_Vnote objects.

$method : string = 'REQUEST'

The iTip method to use.

Return values
string

The iCalendar data.

exportFile()

Stub to export data to a file.

public abstract exportFile(mixed $filename, mixed $data) : mixed
Parameters
$filename : mixed
$data : mixed
Return values
mixed

getContentType()

Returns the content type.

public getContentType() : string
Return values
string

The content type.

getFilename()

Returns the full filename including the basename and extension.

public getFilename(string $basename) : string
Parameters
$basename : string

Basename for the file.

Return values
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
Return values
string

The guessed expected newline characters, either \n, \r or \r\n.

importData()

Stub to import passed data.

public importData(mixed $text) : mixed
Parameters
$text : mixed
Return values
mixed

importFile()

Imports a file.

public importFile(mixed $filename[, mixed $header = false ]) : mixed
Parameters
$filename : mixed
$header : mixed = false
Return values
mixed

importUrl()

Imports a URL.

public importUrl(mixed $url[, mixed $header = false ]) : mixed
Parameters
$url : mixed
$header : mixed = false
Tags
since
2.1.0
Return values
mixed

nextStep()

Takes all necessary actions for the given import step, parameters and form values and returns the next necessary step.

public nextStep(int $action[, array<string|int, mixed> $param = array() ]) : mixed
Parameters
$action : int

The current step. One of the IMPORT_* constants.

$param : array<string|int, mixed> = array()

An associative array containing needed parameters for the current step.

Tags
throws
Horde_Data_Exception
Return values
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<string|int, mixed>
Return values
array<string|int, mixed>

A (possibly empty) list of warnings.

_mapDate()

Maps a date/time string to an associative array.

protected _mapDate(string $date, string $type, array<string|int, mixed> $params, int $key) : string
Parameters
$date : string

The date.

$type : string

One of 'date', 'time' or 'datetime'.

$params : array<string|int, mixed>

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 : int

The key to use for $params.

Return values
string

The date or time in ISO format.

Search results