PHP 클래스 Box\Spout\Writer\Common\Helper\AbstractStyleHelper

파일 보기 프로젝트 열기: box/spout 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$serializedStyleToStyleIdMappingTable [SERIALIZED_STYLE] => [STYLE_ID] mapping table, keeping track of the registered styles
$styleIdToStyleMappingTable [STYLE_ID] => [STYLE] mapping table, keeping track of the registered styles

공개 메소드들

메소드 설명
__construct ( Style $defaultStyle )
applyExtraStylesIfNeeded ( Style $style, array $dataRow ) : Style Apply additional styles if the given row needs it.
registerStyle ( Style $style ) : Style Registers the given style as a used style.

보호된 메소드들

메소드 설명
applyWrapTextIfCellContainsNewLine ( Style $style, array $dataRow ) : Style Set the "wrap text" option if a cell of the given row contains a new line.
getDefaultStyle ( ) : Style Returns the default style
getRegisteredStyles ( ) : Style[]
getStyleFromSerializedStyle ( string $serializedStyle ) : Style Returns the registered style associated to the given serialization.
hasStyleAlreadyBeenRegistered ( Style $style ) : boolean Returns whether the given style has already been registered.

메소드 상세

__construct() 공개 메소드

public __construct ( Style $defaultStyle )
$defaultStyle Box\Spout\Writer\Style\Style

applyExtraStylesIfNeeded() 공개 메소드

Typically, set "wrap text" if a cell contains a new line.
public applyExtraStylesIfNeeded ( Style $style, array $dataRow ) : Style
$style Box\Spout\Writer\Style\Style The original style
$dataRow array The row the style will be applied to
리턴 Box\Spout\Writer\Style\Style The updated style

applyWrapTextIfCellContainsNewLine() 보호된 메소드

Set the "wrap text" option if a cell of the given row contains a new line.
protected applyWrapTextIfCellContainsNewLine ( Style $style, array $dataRow ) : Style
$style Box\Spout\Writer\Style\Style The original style
$dataRow array The row the style will be applied to
리턴 Box\Spout\Writer\Style\Style The eventually updated style

getDefaultStyle() 보호된 메소드

Returns the default style
protected getDefaultStyle ( ) : Style
리턴 Box\Spout\Writer\Style\Style Default style

getRegisteredStyles() 보호된 메소드

protected getRegisteredStyles ( ) : Style[]
리턴 Box\Spout\Writer\Style\Style[] List of registered styles

getStyleFromSerializedStyle() 보호된 메소드

Returns the registered style associated to the given serialization.
protected getStyleFromSerializedStyle ( string $serializedStyle ) : Style
$serializedStyle string The serialized style from which the actual style should be fetched from
리턴 Box\Spout\Writer\Style\Style

hasStyleAlreadyBeenRegistered() 보호된 메소드

Returns whether the given style has already been registered.
protected hasStyleAlreadyBeenRegistered ( Style $style ) : boolean
$style Box\Spout\Writer\Style\Style
리턴 boolean

registerStyle() 공개 메소드

Duplicate styles won't be registered more than once.
public registerStyle ( Style $style ) : Style
$style Box\Spout\Writer\Style\Style The style to be registered
리턴 Box\Spout\Writer\Style\Style The registered style, updated with an internal ID.

프로퍼티 상세

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

[SERIALIZED_STYLE] => [STYLE_ID] mapping table, keeping track of the registered styles
protected $serializedStyleToStyleIdMappingTable

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

[STYLE_ID] => [STYLE] mapping table, keeping track of the registered styles
protected $styleIdToStyleMappingTable