Skip to content

FWF

Properties

colSpecs

Colspecs

php
public array $colSpecs

includeRegexOpt

Whitelist regex to apply to each line of the file

php
public ?string $includeRegexOpt

excludeRegexOpt

Blacklist regex to apply to each line of the file

php
public ?string $excludeRegexOpt

Methods

format

Apply formats options

php
public format(array $colSpecs): self

Parameters:

ParameterTypeDescription
$colSpecsarray

filter

Apply filter options

php
public filter(?string $includeRegexOpt = null, ?string $excludeRegexOpt = null): self

Parameters:

ParameterTypeDescription
$includeRegexOpt?string
$excludeRegexOpt?string

import

php
public import(\MammothPHP\WoollyM\DataFrame $to = new DataFrame()): \MammothPHP\WoollyM\DataFrame

Parameters:

ParameterTypeDescription
$to\MammothPHP\WoollyM\DataFrame

loadFile

Loads the file which the FWF class was instantiated with.

php
protected loadFile(string $fileData): array

Parameters:

ParameterTypeDescription
$fileDatastring

applyColSpecs

Parses a string of data based on the rules defined in user provided colspecs.

php
private applyColSpecs(string $data, array $colSpecs): array

Parameters:

ParameterTypeDescription
$datastring
$colSpecsarray

Inherited methods

fromFilePath

php
public static fromFilePath(string $path): static
  • This method is static.

Parameters:

ParameterTypeDescription
$pathstring

fromFileInfo

php
public static fromFileInfo(\SplFileInfo $file): static
  • This method is static.

Parameters:

ParameterTypeDescription
$file\SplFileInfo

fromString

php
public static fromString(string $input): static
  • This method is static.

Parameters:

ParameterTypeDescription
$inputstring

convertSplFileToString

php
protected convertSplFileToString(): string

import

php
public import(\MammothPHP\WoollyM\DataFrame $to = new DataFrame()): \MammothPHP\WoollyM\DataFrame
  • This method is abstract.

Parameters:

ParameterTypeDescription
$to\MammothPHP\WoollyM\DataFrame

toArray

php
public toArray(): array


Automatically generated on 2024-07-03

Released under the BSD 3-Clause License.