Documentation

DocumentParameters extends RosetteParamsSetBase
in package

Class DocumentParameters.

Table of Contents

Properties

$content  : string
$contentUri  : string
$genre  : string
$language  : string
$fileName  : string
$multiPartContent  : string

Methods

__construct()  : mixed
Constructor.
get()  : mixed
Gets a property value based on the property name.
getFileName()  : string
Getter for fileName
getMultiPartContent()  : string
Getter for multiPartContent
loadDocumentFile()  : mixed
Loads a file into the object.
loadDocumentString()  : mixed
Loads a string into the object.
serialize()  : string
Serialize into a json string.
set()  : mixed
Sets a property based on the name.
setMultiPartContent()  : mixed
Setter for multiPartContent. Clears the content and contentUri properties if it contains data
validate()  : mixed
Validates parameters.
removeEmptyProperties()  : mixed
Recursively removes empty properties to facilitate json encoding.

Properties

$content

public string $content

content is the text to be analyzed (required if no contentUri)

$contentUri

public string $contentUri

contentUri is a URL to content that will be analyzed (required if no content)

$language

public string $language

language is the language of the content (optional)

$fileName

private string $fileName

fileName is the name of the file containing content to be analyzed

$multiPartContent

private string $multiPartContent

multiPartContent contains content for multipart packaging. Private to prevent processing by the serializer

Methods

get()

Gets a property value based on the property name.

public get(string $propertyName) : mixed
Parameters
$propertyName : string

the name of the property

Tags
throws
RosetteException

if property name not found

Return values
mixed

property value

getFileName()

Getter for fileName

public getFileName() : string
Return values
string

getMultiPartContent()

Getter for multiPartContent

public getMultiPartContent() : string
Return values
string

loadDocumentFile()

Loads a file into the object.

public loadDocumentFile(mixed $path) : mixed

The file will be read as bytes; the appropriate conversion will be determined by the server.

Parameters
$path : mixed

: Pathname of a file acceptable to the C{open} function.

Tags
throws
RosetteException

loadDocumentString()

Loads a string into the object.

public loadDocumentString(mixed $stringData[, mixed $multiPart = false ]) : mixed

The string will be taken as bytes or as Unicode dependent upon its native type and the data type asked for; if the type is HTML or XHTML, bytes are expected, the encoding to be determined by the server.

Parameters
$stringData : mixed
$multiPart : mixed = false
Tags
throws
RosetteException

serialize()

Serialize into a json string.

public serialize(mixed $options) : string
Parameters
$options : mixed

associative array of options

Return values
string

set()

Sets a property based on the name.

public set(string $propertyName, mixed $value) : mixed
Parameters
$propertyName : string

the name of the property

$value : mixed

the value to set

setMultiPartContent()

Setter for multiPartContent. Clears the content and contentUri properties if it contains data

public setMultiPartContent(mixed $str_content) : mixed
Parameters
$str_content : mixed

removeEmptyProperties()

Recursively removes empty properties to facilitate json encoding.

private removeEmptyProperties(mixed $obj) : mixed
Parameters
$obj : mixed

Object to clean


        
On this page

Search results