class Parse (View source)

The Parse class holds all parsing methods.

Methods

static array
caption(string $file) deprecated

Please use FileUtils::caption() instead.

static array
csv(string $str)

Split and trim comma separated string.

static array
dataFile(string $file)

Loads and parses a text file.

static array
fileDeclaration(string $str, Page $Page, bool $stripBaseDir = false) deprecated

Please use FileUtils::fileDeclaration() instead.

static array
jsonOptions(string $str)

Parse a (dirty) JSON string and return an associative, filtered array

Details

static array caption(string $file) deprecated

deprecated 1.9.0

Please use FileUtils::caption() instead.

Parameters

string $file

Return Value

array An array with resolved file paths

See also

FileUtils::caption

static array csv(string $str)

Split and trim comma separated string.

Parameters

string $str

Return Value

array The array of separate and trimmed strings

static array dataFile(string $file)

Loads and parses a text file.

First it separates the different blocks into simple key/value pairs. Then it creates an array of vars by splitting the pairs.

Parameters

string $file

Return Value

array $vars

static array fileDeclaration(string $str, Page $Page, bool $stripBaseDir = false) deprecated

deprecated 1.9.0

Please use FileUtils::fileDeclaration() instead.

Parameters

string $str
Page $Page
bool $stripBaseDir

Return Value

array An array with resolved file paths

See also

FileUtils::fileDeclaration

static array jsonOptions(string $str)

Parse a (dirty) JSON string and return an associative, filtered array

Parameters

string $str

Return Value

array $options - associative array