NaifyView\Ast\ExtendsNode クラス

extends NaifyView\Ast\AbstractNode
implements NaifyView\Ast\NodeInterface

ExtendsNode — 継承する親テンプレートの指定を保持する

ブロックの置き換えは継承処理へ任せ、ここでは親の読み込み元と属性を残す。

プロパティ

名前型説明
private $source string 継承元のテンプレート名
private $attributes array 元のタグの属性名と値

メソッド

メソッド説明
public override __construct(SourceSpan $span, string $source, array $attributes): 解析した情報と元の位置を受け取る
public getSource(): string 読み込み元の指定を返す
public getAttributes(): array 元のタグに記述された属性を返す
public override toArray(): array 構造と元の位置を観測用の配列にまとめる

継承プロパティ

名前型説明継承元
protected $type string ノードの種類 AbstractNode
protected $span SourceSpan 元のテンプレート内の位置 AbstractNode

継承メソッド

メソッド説明継承元
public getType(): string 構文ノードの種別を返す AbstractNode
public getSpan(): SourceSpan 元のテンプレート内の位置を返す AbstractNode
protected buildBasePayload(): array 固有の情報へ添える、種別と位置の配列を作る AbstractNode