class WidgetParser

WidgetParser Widget 코드(custom xml)를 html 로 렌더링 하기 위한 파서

Properties

protected WidgetHandler $widgetHandler

Methods

__construct(WidgetHandler $widgetHandler)

WidgetParser constructor.

mixed
parseXml(string $content)

parseXml

mixed|string
parseWidget(array $matches)

주어진 하나의 위젯 코드를 분석하고, 위젯을 출력한다.

array
parseCode(string $code)

위젯 코드를 php array로 반환한다.

array
xml2array(SimpleXMLElement|SimpleXMLElement[] $xmlObject, array $out = array())

xml 데이터를 배열로 변환한다.

Details

at line 43
__construct(WidgetHandler $widgetHandler)

WidgetParser constructor.

Parameters

WidgetHandler $widgetHandler widget handler

at line 55
mixed parseXml(string $content)

parseXml

Parameters

string $content content html include custom widget xml

Return Value

mixed

at line 69
protected mixed|string parseWidget(array $matches)

주어진 하나의 위젯 코드를 분석하고, 위젯을 출력한다.

Parameters

array $matches 위젯 코드

Return Value

mixed|string

at line 97
array parseCode(string $code)

위젯 코드를 php array로 반환한다.

Parameters

string $code 위젯코드 php 배열 데이터로 변환한다.

Return Value

array

at line 116
protected array xml2array(SimpleXMLElement|SimpleXMLElement[] $xmlObject, array $out = array())

xml 데이터를 배열로 변환한다.

Parameters

SimpleXMLElement|SimpleXMLElement[] $xmlObject xml object
array $out 변환한 데이터를 답을 배열

Return Value

array