Webylon 3.1 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • BulkLoader
  • BulkLoader_Result
  • CsvBulkLoader

Class CsvBulkLoader

Uses the fgetcsv() function to process CSV input. The input is expected to be UTF8.

Object
Extended by ViewableData implements IteratorAggregate
Extended by BulkLoader
Extended by CsvBulkLoader

Direct known subclasses

GroupCsvBulkLoader, MemberCsvBulkLoader

Package: cms\bulkloading
Author: Ingo Schommer, Silverstripe Ltd. (<myfirstname>@silverstripe.com)
See: http://rfc.net/rfc4180.html
Located at sapphire/dev/CsvBulkLoader.php

Methods summary

protected BulkLoader_Result
# processAll( string $filepath, boolean $preview = false )

Process every record in the file

Process every record in the file

Parameters

$filepath
string $filepath Absolute path to the file we're importing (with UTF8 content)
$preview
boolean $preview If true, we'll just output a summary of changes but not actually do anything

Returns

BulkLoader_Result
A collection of objects which are either created, updated or deleted. 'message': free-text string that can optionally provide some more information about what changes have
protected
# processRecord( array $record, array $columnMap, mixed & $results, boolean $preview = false )

Parameters

$record
array $record An map of the data, keyed by the header field defined in BulkLoader::$columnMap
$columnMap
array $columnMap
$results
$result BulkLoader_Result (passed as reference)
$preview
boolean $preview
public unknown
# findExistingObject( array $record )

Find an existing objects based on one or more uniqueness columns specified via BulkLoader::$duplicateChecks

Find an existing objects based on one or more uniqueness columns specified via BulkLoader::$duplicateChecks

Parameters

$record
array $record CSV data column

Returns

unknown
unknown
public boolean
# hasHeaderRow( )

Determine wether any loaded files should be parsed with a header-row (otherwise we rely on BulkLoader::$columnMap.

Determine wether any loaded files should be parsed with a header-row (otherwise we rely on BulkLoader::$columnMap.

Returns

boolean
boolean

Methods inherited from BulkLoader

Title(), __construct(), getImportSpec(), getOptionFields(), isNullValue(), load(), preview()

Methods inherited from ViewableData

ATT_val(), BaseHref(), CSSClasses(), ColumnBreak(), ColumnCalc(), ColumnNumber(), ColumnPad(), ColumnPos(), CurrentMember(), CurrentPage(), Debug(), Even(), EvenOdd(), First(), FirstLast(), HasPerm(), IsAjax(), JS_val(), Last(), Me(), Middle(), MiddleString(), Modulus(), MultipleOf(), Odd(), Pos(), RAW_val(), SQL_val(), ThemeDir(), ThemeName(), Top(), TotalItems(), XML_val(), __get(), __isset(), __set(), buildCastingCache(), cachedCall(), castingClass(), castingHelper(), castingHelperPair(), castingObjectCreator(), castingObjectCreatorPair(), customise(), defineMethods(), escapeTypeForField(), getField(), getIterator(), getSecurityID(), getXMLValues(), hasField(), hasValue(), i18nLocale(), iteratorProperties(), obj(), renderWith(), setCustomisedObj(), setField()

Methods inherited from Object

__call(), __toString(), __wakeup(), addMethodsFrom(), addStaticVars(), addWrapperMethod(), add_extension(), add_static_var(), allMethodNames(), cacheToFile(), cacheToFileWithArgs(), clearCache(), combined_static(), create(), createMethod(), create_from_string(), exists(), extInstance(), extend(), getCustomClass(), getExtensionInstance(), getExtensionInstances(), get_extensions(), get_static(), hasExtension(), hasMethod(), has_extension(), invokeWithExtensions(), is_a(), loadCache(), parentClass(), parse_class_spec(), remove_extension(), sanitiseCachename(), saveCache(), set_stat(), set_static(), set_uninherited(), stat(), strong_create(), uninherited(), uninherited_static(), useCustomClass()

Magic methods summary

Properties summary

public string $delimiter
#

Delimiter character (Default: comma).

Delimiter character (Default: comma).

public string $enclosure
#

Enclosure character (Default: doublequote)

Enclosure character (Default: doublequote)

public boolean $hasHeaderRow
#

Identifies if the has a header row.

Identifies if the has a header row.

Properties inherited from BulkLoader

$columnMap, $deleteExistingRecords, $duplicateChecks, $objectClass, $relationCallbacks, $title

Properties inherited from ViewableData

$casting, $customisedObject, $default_cast, $failover, $iteratorPos, $iteratorTotalItems

Properties inherited from Object

$class, $extension_instances, $extensions

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.1 API Docs API documentation generated by ApiGen 2.8.0