xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • csv
  • file
  • input
  • memory
  • null
  • output
  • stderr
  • stdin
  • stdout
  • swap

Class csv

CSV stream interface.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Stream
Extended by Core\Stream\Driver\csv
Namespace: Core\Stream\Driver
Package: Core\Stream
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Located at Stream/Driver/csv.inc.php

Methods summary

public
# __construct( Core\URI $uri )

Initialises a new stream interface.

Initialises a new stream interface.

Parameters

$uri

URI instance describing the CSV stream interface to initialise. The path segment should describe a data Stream interface.

Since

3.0

Overrides

Core\Stream::__construct
protected mixed
# _removeEscapeSequences( $string )

Parameters

$string

Returns

mixed

Since

3.0
public
# dismantle( )

Returns


$this

Since

3.0

Overrides

Core\Stream::dismantle
public
# establish( integer $access )

Establishes the stream interface.

Establishes the stream interface.

Parameters

$access

Returns


$this

Since

3.0

Overrides

Core\Stream::establish
public integer|null
# length( )

Returns the size of the Stream in units. A unit corresponds to a CSV entry (or row).

Returns the size of the Stream in units. A unit corresponds to a CSV entry (or row).

This method should be used with caution. The method only works for build-in PHP streams and it needs to read the whole stream once, therefore establishing an additional connection to the wrapper target. This may not be suitable for certain types of streams.

Returns

integer|null
Number of CSV rows or null, if the length cannot be determined.

Since

3.0
public array
# read( $units )

Reads from stream. Reads a number of CSV entries from back-end stream.

Reads from stream. Reads a number of CSV entries from back-end stream.

Parameters

$units
limit of CSV rows to read.

Returns

array
Returns an array of lines read from stream or null on error.

Since

3.0 \todo Implementation for non build-in streams.


public integer
# write( $segments, $units = Core\Stream\Driver\null )

Writes to stream. Writes to stream.

Writes to stream. Writes to stream.

Parameters

$segments
to write to stream.
$units
number of units to write to stream.

Returns

integer
Returns the number of units written to the stream.

Since

3.0

Methods inherited from Core\Stream

__destruct(), _verifyAccess(), autocreate(), canCreate(), canRead(), canStat(), canTruncate(), canWrite(), chain(), flush(), readRemainingSegments(), readln(), stderr(), stdin(), stdout(), writeln()

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

string DelimiterParameter

CSV data cells delimiter character in system character set. Defaults to »,«.

CSV data cells delimiter character in system character set. Defaults to »,«.

Since

3.0
# 'delimiter'
string EnclosureParameter

CSV data cells optional enclosure character in system character set. Defaults to »"«.

CSV data cells optional enclosure character in system character set. Defaults to »"«.

Since

3.0
# 'enclosure'
string EscapeParameter

CSV data cells escape character in system character set. Defaults to »\«.

CSV data cells escape character in system character set. Defaults to »\«.

Since

3.0
# 'escape'
string LineEndingParameter

Line ending string for CSV data rows (used for writing only). Defined in system character set. Defaults to LF.

Line ending string for CSV data rows (used for writing only). Defined in system character set. Defaults to LF.

Since

3.0
# 'line-ending'
string LookAheadParameter

Maximum line length in bytes of the entire CSV file for look-ahead optimisation. Defaults to 0 (disabled look-ahead optimisation).

Maximum line length in bytes of the entire CSV file for look-ahead optimisation. Defaults to 0 (disabled look-ahead optimisation).

Since

3.0
# 'look-ahead'

Constants inherited from Core\Stream

CharsetParameter, Create, Read, Stat, Truncate, Write

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected Core\Stream $_v_stream
#

Properties inherited from Core\Stream

$_v_access, $_v_decoder, $_v_encoder, $_v_established, $_v_onDismantle, $_v_parameters, $_v_uri

Magic properties inherited from Core\Stream

$access, $canCreate, $canRead, $canStat, $canTruncate, $canWrite, $decoder, $encoder, $established, $length, $onDismantle, $parameters, $uri

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen