a-blog cms PHP API Reference

PageGenerator extends Generator
in package

Table of Contents

Properties

$compiler  : Compiler
$destination  : Destination
$logger  : Logger
$maxPage  : int|null
$maxPublishCount  : int
$pageGenerationService  : PageGenerationService
$targetBlogId  : int
$targetBlogName  : string

Methods

__construct()  : mixed
Generator constructor.
addEntryPage()  : void
エントリーページを追加する
addPage()  : void
ページを追加する
onPageGenerationError()  : void
ページ生成エラー時の処理
onPageGenerationStart()  : bool
開始時の処理
onPageGenerationSuccess()  : void
ページ生成成功時の処理
requestStop()  : void
停止を要求する
run()  : void
ページ生成を開始する
setMaxPage()  : void
handle()  : void
書き出しのために、ページ取得を開始する
handleError()  : void
onBeforeRequest()  : void
リクエスト前の処理
onSuccess()  : void
リクエスト成功時の処理
writeContents()  : void

Properties

$maxPublishCount

protected int $maxPublishCount

$targetBlogName

protected string $targetBlogName

Methods

__construct()

Generator constructor.

public __construct(int $targetBlogId, Compiler $compiler, Destination $destination, Logger $logger[, int $maxPublishCount = 5 ]) : mixed
Parameters
$targetBlogId : int
$compiler : Compiler
$destination : Destination
$logger : Logger
$maxPublishCount : int = 5

addEntryPage()

エントリーページを追加する

public addEntryPage(string $url, string $destinationPathname, int $entryId) : void
Parameters
$url : string
$destinationPathname : string
$entryId : int

addPage()

ページを追加する

public addPage(string $url, string $destinationPathname) : void
Parameters
$url : string
$destinationPathname : string

onPageGenerationError()

ページ生成エラー時の処理

public onPageGenerationError(Page $page, int $statusCode, ProcessResult $result) : void
Parameters
$page : Page
$statusCode : int
$result : ProcessResult

onPageGenerationStart()

開始時の処理

public onPageGenerationStart(Page $page) : bool
Parameters
$page : Page
Return values
bool

onPageGenerationSuccess()

ページ生成成功時の処理

public onPageGenerationSuccess(Page $page, string $stdout, int $statusCode, ProcessResult $result) : void
Parameters
$page : Page
$stdout : string
$statusCode : int
$result : ProcessResult

requestStop()

停止を要求する

public requestStop() : void

run()

ページ生成を開始する

public run() : void
Tags
inheritDoc

setMaxPage()

public setMaxPage(int $maxPage) : void
Parameters
$maxPage : int

handle()

書き出しのために、ページ取得を開始する

protected final handle() : void

handleError()

protected handleError(Throwable $th, string $url, int $statusCode) : void
Parameters
$th : Throwable
$url : string
$statusCode : int

onBeforeRequest()

リクエスト前の処理

protected onBeforeRequest(Page $page) : void
Parameters
$page : Page

onSuccess()

リクエスト成功時の処理

protected onSuccess(Page $page, string $data, int $statusCode) : void
Parameters
$page : Page
$data : string
$statusCode : int

writeContents()

protected writeContents(string $path, string $data) : void
Parameters
$path : string
$data : string

        
On this page

Search results