Overview

Packages

  • akismet
  • None
  • PHP
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • plugins
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Signatures
    • Signed
    • Transport
  • wa-apps
    • blog
      • actions
        • backend
        • blog
        • comment
        • cron
        • design
        • frontend
        • page
        • plugin
        • post
      • api
        • v1
      • cli
      • layout
      • model
      • plugin
        • aksimet
        • category
        • emailsubscription
        • favorite
        • gravatar
        • import
        • markdown
        • myposts
        • tag
        • troll
      • settings
    • checklists
      • backend
      • json
    • contacts
      • backend
    • developer
    • dummy
    • guestbook
    • guestbook2
    • photos
      • album
      • api
        • v1
      • backend
      • design
      • dialog
      • frontend
      • page
      • photo
      • plugin
        • comment
        • imageeffects
        • import
        • publicgallery
        • watermark
      • search
      • settings
      • stack
      • tag
      • upload
    • site
      • backend
      • blocks
      • config
      • design
      • domains
      • files
      • frontend
      • helper
      • layout
      • pages
      • routing
      • setting
    • stickies
      • api
        • v1
      • sheet
      • stiky
  • wa-plugin
    • payment
    • shipping
    • sms
  • wa-plugins
    • shipping
      • usps
  • wa-system
    • API
    • Auth
      • Adapters
    • Autoload
    • Cache
      • Adapter
    • Captcha
    • Config
    • Contact
    • controller
    • currency
    • database
    • datetime
    • design
    • event
    • exception
    • files
    • image
    • layout
    • locale
    • log
    • mail
    • page
      • action
      • model
    • payment
    • plugin
    • request
    • response
    • routing
    • shipping
    • sms
    • storage
    • user
    • util
    • validator
    • view
    • webasyst
      • api
      • backend
      • cli
      • config
      • layout
      • login
      • model
      • password
      • payment
      • profile
      • settings
      • shipment
    • widget
    • workflow
  • waPlugins
    • Payment
  • webasyst
    • wa-system
      • helper

Classes

  • waArrayObject
  • waArrayObjectDiff
  • waCSV
  • waHtmlControl
  • waString
  • waUtils
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class waCSV

Package: wa-system\util
Located at wa-system/util/waCSV.class.php
Methods summary
public static
# getDelimiters( )
public
# __construct( mixed $first_line = false, mixed $delimiter = ",", mixed $fields = array(), mixed $file = false )

Constructor

Constructor

Parameters

$first_line
mixed
$file - path to the source file
$delimiter
$fields
$file
public
# setEncoding( mixed $encoding )
public
# setFile( mixed $file )
public
# getPath( mixed $file )
public
# setFields( mixed $fields )

Set Fields

Set Fields

Parameters

$fields
mixed
$fields
public
# getFields( )
public string
# upload( mixed $name )

Upload file and returns path to the file

Upload file and returns path to the file

Parameters

$name
mixed
$name

Returns

string
public string
# saveContent( mixed $content )

Save text in the temp file (for import from text)

Save text in the temp file (for import from text)

Parameters

$content
mixed
$content

Returns

string
public array
# getInfo( )

Returns stat info about csv-file
array(
'DELIMITER' => ...,
'FIELDS' => array(...), // fields in the first row
'NUM_ROWS' => ... // Count of the rows in the file
)

Returns stat info about csv-file array( 'DELIMITER' => ..., 'FIELDS' => array(...), // fields in the first row 'NUM_ROWS' => ... // Count of the rows in the file )

Returns

array
protected
# encodeArray( mixed $a )
protected
# notEmptyArray( mixed $a )
public
# getDelimiterIndex( mixed $delimiter )
public array
# import( mixed $limit = 50 )

Read CSV-file and returns data

Read CSV-file and returns data

Parameters

$limit
mixed
$limit

Returns

array
Constants summary
integer MAX_FIELDS_COUNT 100
#
Properties summary
protected boolean $file false
#
protected mixed $handler
#
public static array $delimiters array( 0 => array(",", "Comma"), 1 => array(";", "Semicolon"), 2 => array("\t", "Tab"), //3 => array(".", "Period") )
#
protected string $quote '"'
#
protected integer $length 4096
#
protected array $extensions array('txt', 'csv')
#
protected mixed $delimiter
#
protected array $fields
#
protected boolean $first_line false
#
protected boolean $format_id false
#
public boolean $encode false
#
My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0