modules/Import/ImportFileSplitter.php

Show: inherited
Table of Contents

\ImportFileSplitter

Package:

Properties

Propertyprivate  $_fileCount= ''

Count of files that we split the $_sourceFile into

Details
Type
n/a
Propertyprivate  $_recordCount= ''

Count of records in $_sourceFile

Details
Type
n/a
Propertyprivate  $_recordThreshold= ''

Maximum number of records per file

Details
Type
n/a
Propertyprivate  $_sourceFile= ''

Filename of file we are splitting

Details
Type
n/a

Methods

methodpublic__construct( string $source = null,  $recordThreshold = 1000 ) : void

Constructor

Parameters
Name Type Description
$source string

filename we are splitting

$recordThreshold
methodpublicfileExists( ) : bool

Returns true if the filename given exists and is readable

Returns
Type Description
bool
methodpublicgetFileCount( ) : int

Return the count of files created by the split, if it's been processed with splitSourceFile()

Returns
Type Description
int count of files created by the split
methodpublicgetRecordCount( ) : int

Return the count of records in the file, if it's been processed with splitSourceFile()

Returns
Type Description
int count of records in the file
methodpublicgetSplitFileName( int $filenumber = 0 ) : string

Return file name of one of the split files

Parameters
Name Type Description
$filenumber int

which split file we want

Returns
Type Description
string filename
methodpublicsplitSourceFile( string $delimiter = ',', string $enclosure = '"', bool $has_header = false ) : void

Actually split the file into parts

Parameters
Name Type Description
$delimiter string
$enclosure string
$has_header bool

true if file has a header row

Documentation was generated by DocBlox 0.18.1.