PHP 클래스 Box\Spout\Reader\AbstractReader

상속: implements Box\Spout\Reader\ReaderInterface
파일 보기 프로젝트 열기: box/spout

보호된 프로퍼티들

프로퍼티 타입 설명
$globalFunctionsHelper Helper to work with global functions
$isStreamOpened Indicates whether the stream is currently open
$options Reader's customized options

공개 메소드들

메소드 설명
close ( ) : void Closes the reader, preventing any additional reading
getSheetIterator ( ) : Iterator Returns an iterator to iterate over sheets.
open ( string $filePath ) : void Prepares the reader to read the given file. It also makes sure that the file exists and is readable.
setGlobalFunctionsHelper ( Box\Spout\Common\Helper\GlobalFunctionsHelper $globalFunctionsHelper ) : AbstractReader
setShouldFormatDates ( boolean $shouldFormatDates ) : AbstractReader Sets whether date/time values should be returned as PHP objects or be formatted as strings.
setShouldPreserveEmptyRows ( boolean $shouldPreserveEmptyRows ) : AbstractReader Sets whether empty rows should be returned or skipped.

보호된 메소드들

메소드 설명
closeReader ( ) : AbstractReader Closes the reader. To be used after reading the file.
doesSupportStreamWrapper ( ) : boolean Returns whether stream wrappers are supported
getConcreteSheetIterator ( ) : Iterator Returns an iterator to iterate over sheets.
getFileRealPath ( string $filePath ) : string Returns the real path of the given path.
getOptions ( ) : ReaderOptions Returns the reader's current options
getStreamWrapperScheme ( string $filePath ) : string | null Returns the scheme of the custom stream wrapper, if the path indicates a stream wrapper is used.
isPhpStream ( string $filePath ) : boolean Checks if a path is a PHP stream (like php://output, php://memory, .
isStreamWrapper ( string $filePath ) : boolean Checks if the given path is an unsupported stream wrapper (like local path, php://temp, mystream://foo/bar.
isSupportedStreamWrapper ( string $filePath ) : boolean Checks if the given path is an supported stream wrapper (like php://temp, mystream://foo/bar.
openReader ( string $filePath ) : void Opens the file at the given file path to make it ready to be read

메소드 상세

close() 공개 메소드

Closes the reader, preventing any additional reading
public close ( ) : void
리턴 void

closeReader() 추상적인 보호된 메소드

Closes the reader. To be used after reading the file.
abstract protected closeReader ( ) : AbstractReader
리턴 AbstractReader

doesSupportStreamWrapper() 추상적인 보호된 메소드

Returns whether stream wrappers are supported
abstract protected doesSupportStreamWrapper ( ) : boolean
리턴 boolean

getConcreteSheetIterator() 추상적인 보호된 메소드

Returns an iterator to iterate over sheets.
abstract protected getConcreteSheetIterator ( ) : Iterator
리턴 Iterator To iterate over sheets

getFileRealPath() 보호된 메소드

If the given path is a valid stream wrapper, returns the path unchanged.
protected getFileRealPath ( string $filePath ) : string
$filePath string
리턴 string

getOptions() 추상적인 보호된 메소드

Returns the reader's current options
abstract protected getOptions ( ) : ReaderOptions
리턴 Box\Spout\Reader\Common\ReaderOptions

getSheetIterator() 공개 메소드

Returns an iterator to iterate over sheets.
public getSheetIterator ( ) : Iterator
리턴 Iterator To iterate over sheets

getStreamWrapperScheme() 보호된 메소드

For example, php://temp => php, s3://path/to/file => s3...
protected getStreamWrapperScheme ( string $filePath ) : string | null
$filePath string Path of the file to be read
리턴 string | null The stream wrapper scheme or NULL if not a stream wrapper

isPhpStream() 보호된 메소드

..)
protected isPhpStream ( string $filePath ) : boolean
$filePath string Path of the file to be read
리턴 boolean Whether the given path maps to a PHP stream

isStreamWrapper() 보호된 메소드

..).
protected isStreamWrapper ( string $filePath ) : boolean
$filePath string Path of the file to be read
리턴 boolean Whether the given path is an unsupported stream wrapper

isSupportedStreamWrapper() 보호된 메소드

..). If the given path is a local path, returns true.
protected isSupportedStreamWrapper ( string $filePath ) : boolean
$filePath string Path of the file to be read
리턴 boolean Whether the given path is an supported stream wrapper

open() 공개 메소드

Prepares the reader to read the given file. It also makes sure that the file exists and is readable.
public open ( string $filePath ) : void
$filePath string Path of the file to be read
리턴 void

openReader() 추상적인 보호된 메소드

Opens the file at the given file path to make it ready to be read
abstract protected openReader ( string $filePath ) : void
$filePath string Path of the file to be read
리턴 void

setGlobalFunctionsHelper() 공개 메소드

public setGlobalFunctionsHelper ( Box\Spout\Common\Helper\GlobalFunctionsHelper $globalFunctionsHelper ) : AbstractReader
$globalFunctionsHelper Box\Spout\Common\Helper\GlobalFunctionsHelper
리턴 AbstractReader

setShouldFormatDates() 공개 메소드

Sets whether date/time values should be returned as PHP objects or be formatted as strings.
public setShouldFormatDates ( boolean $shouldFormatDates ) : AbstractReader
$shouldFormatDates boolean
리턴 AbstractReader

setShouldPreserveEmptyRows() 공개 메소드

Sets whether empty rows should be returned or skipped.
public setShouldPreserveEmptyRows ( boolean $shouldPreserveEmptyRows ) : AbstractReader
$shouldPreserveEmptyRows boolean
리턴 AbstractReader

프로퍼티 상세

$globalFunctionsHelper 보호되어 있는 프로퍼티

Helper to work with global functions
protected $globalFunctionsHelper

$isStreamOpened 보호되어 있는 프로퍼티

Indicates whether the stream is currently open
protected $isStreamOpened

$options 보호되어 있는 프로퍼티

Reader's customized options
protected $options