RequireThemeGenerator
extends ThemeGenerator
in package
Table of Contents
Properties
- $compiler : Compiler
- $destination : Destination
- $exclusionList : array<string|int, string>
- $includeList : array<string|int, mixed>
- $logger : Logger
- $maxPublishCount : int
- $pageGenerationService : PageGenerationService
- $sourceTheme : string
- $targetBlogId : int
- $targetBlogName : string
Methods
- __construct() : mixed
- Generator constructor.
- addEntryPage() : void
- エントリーページを追加する
- addPage() : void
- ページを追加する
- onPageGenerationError() : void
- ページ生成エラー時の処理
- onPageGenerationStart() : bool
- 開始時の処理
- onPageGenerationSuccess() : void
- ページ生成成功時の処理
- requestStop() : void
- 停止を要求する
- run() : void
- ページ生成を開始する
- setExclusionList() : void
- setIncludeList() : void
- setSourceTheme() : void
- createPages() : array<string|int, string>
- getName() : string
- handle() : void
- 書き出しのために、ページ取得を開始する
- handleError() : void
- onBeforeRequest() : void
- リクエスト前の処理
- onSuccess() : void
- リクエスト成功時の処理
- writeContents() : void
Properties
$compiler
protected
Compiler
$compiler
$destination
protected
Destination
$destination
$exclusionList
protected
array<string|int, string>
$exclusionList
= []
$includeList
protected
array<string|int, mixed>
$includeList
= []
$logger
protected
Logger
$logger
$maxPublishCount
protected
int
$maxPublishCount
$pageGenerationService
protected
PageGenerationService
$pageGenerationService
$sourceTheme
protected
string
$sourceTheme
$targetBlogId
protected
int
$targetBlogId
$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
boolonPageGenerationSuccess()
ページ生成成功時の処理
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
setExclusionList()
public
setExclusionList(array<string|int, string> $list) : void
Parameters
- $list : array<string|int, string>
setIncludeList()
public
setIncludeList(array<string|int, string> $list) : void
Parameters
- $list : array<string|int, string>
setSourceTheme()
public
setSourceTheme(string $sourceTheme) : void
Parameters
- $sourceTheme : string
createPages()
protected
createPages(Finder $iterator) : array<string|int, string>
Parameters
- $iterator : Finder
Return values
array<string|int, string>getName()
protected
getName() : string
Return values
stringhandle()
書き出しのために、ページ取得を開始する
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