PHP 클래스 Plum\Plum\Workflow

저자: Florian Eckerstorfer ([email protected])
파일 보기 프로젝트 열기: plumphp/plum 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $options = [] )
addConverter ( Plum\Plum\Converter\ConverterInterface | callable | array $element ) : Workflow
addFilter ( array | callable | Plum\Plum\Filter\FilterInterface $element ) : Workflow
addWriter ( Plum\Plum\Writer\WriterInterface | array $element ) : Workflow
getConverters ( ) : ConverterPipe[]
getFilters ( ) : FilterPipe[]
getPipeline ( string | null $type = null ) : AbstractPipe[]
getWriters ( ) : WriterPipe[]
process ( Plum\Plum\Reader\ReaderInterface[] | Plum\Plum\Reader\ReaderInterface $readers ) : Result

보호된 메소드들

메소드 설명
addPipe ( AbstractPipe $pipe ) : Workflow Inserts an element into the pipeline at the given position.
convertItem ( mixed $item, ConverterPipe $pipe ) : mixed Applies the given converter to the given item either if no filter is given or if the filter returns true.
convertItemValue ( mixed $item, ConverterPipe $pipe ) : mixed Applies the given converter to the given field in the given item if no filter is given or if the filters returns true for the field.
finishWriters ( WriterPipe[] $writers )
prepareWriters ( WriterPipe[] $writers )
processItem ( mixed $item, Result $result )
processReader ( Plum\Plum\Reader\ReaderInterface $reader, Result $result )
writeItem ( mixed $item, WriterPipe $pipe ) : boolean Writes the given item to the given writer if the no filter is given or the filter returns true.

메소드 상세

__construct() 공개 메소드

public __construct ( array $options = [] )
$options array

addConverter() 공개 메소드

public addConverter ( Plum\Plum\Converter\ConverterInterface | callable | array $element ) : Workflow
$element Plum\Plum\Converter\ConverterInterface | callable | array
리턴 Workflow $this

addFilter() 공개 메소드

public addFilter ( array | callable | Plum\Plum\Filter\FilterInterface $element ) : Workflow
$element array | callable | Plum\Plum\Filter\FilterInterface
리턴 Workflow

addPipe() 보호된 메소드

Inserts an element into the pipeline at the given position.
protected addPipe ( AbstractPipe $pipe ) : Workflow
$pipe Plum\Plum\Pipe\AbstractPipe
리턴 Workflow

addWriter() 공개 메소드

public addWriter ( Plum\Plum\Writer\WriterInterface | array $element ) : Workflow
$element Plum\Plum\Writer\WriterInterface | array
리턴 Workflow

convertItem() 보호된 메소드

Applies the given converter to the given item either if no filter is given or if the filter returns true.
protected convertItem ( mixed $item, ConverterPipe $pipe ) : mixed
$item mixed
$pipe Plum\Plum\Pipe\ConverterPipe
리턴 mixed

convertItemValue() 보호된 메소드

Applies the given converter to the given field in the given item if no filter is given or if the filters returns true for the field.
protected convertItemValue ( mixed $item, ConverterPipe $pipe ) : mixed
$item mixed
$pipe Plum\Plum\Pipe\ConverterPipe
리턴 mixed

finishWriters() 보호된 메소드

protected finishWriters ( WriterPipe[] $writers )
$writers Plum\Plum\Pipe\WriterPipe[]

getConverters() 공개 메소드

public getConverters ( ) : ConverterPipe[]
리턴 Plum\Plum\Pipe\ConverterPipe[]

getFilters() 공개 메소드

public getFilters ( ) : FilterPipe[]
리턴 Plum\Plum\Pipe\FilterPipe[]

getPipeline() 공개 메소드

public getPipeline ( string | null $type = null ) : AbstractPipe[]
$type string | null
리턴 Plum\Plum\Pipe\AbstractPipe[]

getWriters() 공개 메소드

public getWriters ( ) : WriterPipe[]
리턴 Plum\Plum\Pipe\WriterPipe[]

prepareWriters() 보호된 메소드

protected prepareWriters ( WriterPipe[] $writers )
$writers Plum\Plum\Pipe\WriterPipe[]

process() 공개 메소드

public process ( Plum\Plum\Reader\ReaderInterface[] | Plum\Plum\Reader\ReaderInterface $readers ) : Result
$readers Plum\Plum\Reader\ReaderInterface[] | Plum\Plum\Reader\ReaderInterface
리턴 Result

processItem() 보호된 메소드

protected processItem ( mixed $item, Result $result )
$item mixed
$result Result

processReader() 보호된 메소드

protected processReader ( Plum\Plum\Reader\ReaderInterface $reader, Result $result )
$reader Plum\Plum\Reader\ReaderInterface
$result Result

writeItem() 보호된 메소드

Writes the given item to the given writer if the no filter is given or the filter returns true.
protected writeItem ( mixed $item, WriterPipe $pipe ) : boolean
$item mixed
$pipe Plum\Plum\Pipe\WriterPipe
리턴 boolean `true` if the item has been written, `false` if not.