PHP 클래스 Apple_Exporter\Components\Body

부터: 0.2.0
상속: extends Component
파일 보기 프로젝트 열기: alleyinteractive/apple-news 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$needs_layout_if_anchored boolean Override. This component doesn't need a layout update if marked as the target of an anchor.

보호된 프로퍼티들

프로퍼티 타입 설명
$can_be_anchor_target boolean Quotes can be anchor targets.

공개 메소드들

메소드 설명
node_matches ( DomNode $node ) : mixed Look for node matches for this component.
set_default_style ( ) Set the default style for the component.
to_array ( ) : array This component needs to ensure it didn't end up with empty content.

보호된 메소드들

메소드 설명
build ( string $text ) Build the component.

비공개 메소드들

메소드 설명
get_col_start ( ) Get the start column for the body based on the layout.
get_default_style ( ) : array Get the default style for the component.
set_default_layout ( ) Set the default layout for the component.
set_initial_dropcap_style ( ) Set the initial dropcap style for the component.
split_non_markdownable ( string $html ) : array Split the non markdownable content for processing.

메소드 상세

build() 보호된 메소드

Build the component.
protected build ( string $text )
$text string

node_matches() 공개 정적인 메소드

Look for node matches for this component.
public static node_matches ( DomNode $node ) : mixed
$node DomNode
리턴 mixed

set_default_style() 공개 메소드

Set the default style for the component.
public set_default_style ( )

to_array() 공개 메소드

This will go through sanitize_text_field later as part of the assembled JSON. Therefore, tags aren't valid but we need to catch them now or we could encounter a parsing error when it's already too late. We also can't do this sooner, such as in build, because at that point the component could still contain nested, valid tags. We don't want to modify the JSON since it will still undergo further processing. We only want to check if, on its own, this component would end up empty.
public to_array ( ) : array
리턴 array

프로퍼티 상세

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

Quotes can be anchor targets.
protected bool $can_be_anchor_target
리턴 boolean

$needs_layout_if_anchored 공개적으로 프로퍼티

Override. This component doesn't need a layout update if marked as the target of an anchor.
public bool $needs_layout_if_anchored
리턴 boolean