a-blog cms PHP API Reference

WxrEngine
in package

Table of Contents

Properties

$blogRepository  : BlogRepository
$cancellationToken  : CancellationToken|null
$categoryWriter  : CategoryWriter
$entryWriter  : EntryWriter
$helper  : mixed
$includeChildBlogs  : bool
$logger  : Logger
$targetBlogId  : int
$userWriter  : UserWriter
$writer  : XMLWriter|null
書き出し中の XMLWriter。後始末のクロージャに直接持たせると、その間ファイルが開いたままになる

Methods

__construct()  : mixed
Constructor
export()  : void
エクスポート実行
createWriter()  : XMLWriter
XMLWriter を生成
outputWxr()  : void
書き出しを開始
releaseWriter()  : void
XMLWriter を手放して出力ファイルを閉じる
throwIfCancellationRequested()  : void
writeChannelElement()  : void
チャンネル要素を書き出し
writeFile()  : void
WXR ファイルを書き出して保存先へ置く
writeItems()  : void
アイテム配列を書き出し
writeRootElement()  : void
ルート要素を書き出し

Properties

$helper

protected mixed $helper
Tags
@var

\Acms\Services\Export\Helper;

$includeChildBlogs

protected bool $includeChildBlogs

$writer

書き出し中の XMLWriter。後始末のクロージャに直接持たせると、その間ファイルが開いたままになる

protected XMLWriter|null $writer

Methods

__construct()

Constructor

public __construct() : mixed

export()

エクスポート実行

public export(int $bid, bool $includeChildBlogs, string $outputPath[, CancellationToken|null $token = null ]) : void

$token を渡すと、ユーザー・カテゴリー・エントリーの書き出しの区切りとエントリー1件ごとに 中止要求を確かめ、中止したときは書きかけの XML を残さない。

Parameters
$bid : int
$includeChildBlogs : bool
$outputPath : string
$token : CancellationToken|null = null

createWriter()

XMLWriter を生成

protected createWriter(string $outputPath) : XMLWriter
Parameters
$outputPath : string
Return values
XMLWriter

outputWxr()

書き出しを開始

protected outputWxr(XMLWriter $writer) : void
Parameters
$writer : XMLWriter

releaseWriter()

XMLWriter を手放して出力ファイルを閉じる

protected releaseWriter() : void

XMLWriter には閉じるメソッドが無く、参照がなくなったときにファイルが閉じられる。

throwIfCancellationRequested()

protected throwIfCancellationRequested() : void

writeChannelElement()

チャンネル要素を書き出し

protected writeChannelElement(XMLWriter $writer) : void
Parameters
$writer : XMLWriter

writeFile()

WXR ファイルを書き出して保存先へ置く

protected writeFile(string $outputPath) : void
Parameters
$outputPath : string

writeItems()

アイテム配列を書き出し

protected writeItems(XMLWriter $writer) : void
Parameters
$writer : XMLWriter

writeRootElement()

ルート要素を書き出し

protected writeRootElement(XMLWriter $writer) : void
Parameters
$writer : XMLWriter

        
On this page

Search results