a-blog cms PHP API Reference

Engine
in package

Table of Contents

Properties

$compiler  : Compiler
$config  : stdClass
$destination  : Destination
$finder  : Finder
$logger  : Logger
$maxPublish  : int

Methods

__construct()  : mixed
Engine constructor.
init()  : void
初期設定
run()  : void
Run
copyAssets()  : void
copy assets
copyStorageMedia()  : void
storage/ 直下のうち書き出し対象(添付ファイルの実体)のディレクトリだけをコピーする。
copyThemeItems()  : void
copy theme items
copyThemeRequireItems()  : void
copy theme require items
deleteOldFiles()  : void
delete files
extractTheme()  : array<string|int, mixed>
get themes
getConfig()  : mixed
processExportAssets()  : void
アセットの書き出し
processExportCategoryArchivePage()  : void
カテゴリーアーカイブページの書き出し
processExportCategoryPagenation()  : void
カテゴリーページの書き出し
processExportCategoryTop()  : void
カテゴリートップの書き出し
processExportEntry()  : void
エントリーの書き出し
processExportPagenation()  : void
ページの書き出し
processExportTheme()  : void
テーマのテンプレート書き出し
processExportThemeAssets()  : mixed
テーマのアセット書き出し
processExportTop()  : void
トップページの書き出し
processResolvCssPath()  : mixed
css の url属性のパス解決
resolvePathInCss()  : void
css の url属性のパス解決

Properties

$config

protected stdClass $config

$finder

protected Finder $finder

$maxPublish

protected int $maxPublish = 3

Methods

__construct()

Engine constructor.

public __construct() : mixed

init()

初期設定

public init(Logger $logger, Destination $destination, int $maxPublish, stdClass $config) : void
Parameters
$logger : Logger
$destination : Destination
$maxPublish : int
$config : stdClass
Tags
throws
Exception

run()

Run

public run(int $bid) : void
Parameters
$bid : int

copyAssets()

copy assets

protected copyAssets(int $bid) : void
Parameters
$bid : int

copyStorageMedia()

storage/ 直下のうち書き出し対象(添付ファイルの実体)のディレクトリだけをコピーする。

protected copyStorageMedia(string $srcStorageDir, string $destStorageDir) : void

Why not(判定方式): 数字ディレクトリだけを通す許可リストにする理由は StorageDirPolicy 参照(除外リスト方式は列挙し切れないため採らない)。

Why not(ブログで絞らない): 呼び出し元の copyAssets(int $bid) は $bid を持っているが、 このメソッドには渡していない。archives/ は $bid でディレクトリを絞ってコピーしているのに対し、 storage/ は意図的にブログで絞り込まない。エントリーが他ブログの添付ファイルを参照するケースが あり、絞るとリンク切れになるため。同じ理由で MEDIA_LIBRARY_DIR(media/)も $bid に関係なく 全ブログ分をコピーしている(copyAssets() 参照)。ブログ単位で絞られているのは ARCHIVES_DIR(archives/)だけであり、これは意図した非対称であって絞り忘れではない。

Parameters
$srcStorageDir : string
$destStorageDir : string

copyThemeItems()

copy theme items

protected copyThemeItems(string $theme) : void
Parameters
$theme : string

copyThemeRequireItems()

copy theme require items

protected copyThemeRequireItems(string $theme) : void
Parameters
$theme : string

deleteOldFiles()

delete files

protected deleteOldFiles(int $bid) : void
Parameters
$bid : int

extractTheme()

get themes

protected extractTheme(string $theme) : array<string|int, mixed>
Parameters
$theme : string
Return values
array<string|int, mixed>

getConfig()

protected getConfig(mixed $key, mixed $default, mixed $i) : mixed
Parameters
$key : mixed
$default : mixed
$i : mixed

processExportAssets()

アセットの書き出し

protected processExportAssets(int $bid) : void
Parameters
$bid : int

processExportCategoryArchivePage()

カテゴリーアーカイブページの書き出し

protected processExportCategoryArchivePage(int $bid, array<string|int, int> $categoryIds, array<string|int, mixed> $startDates, array<string|int, mixed> $maxPages[, bool $generateMonthArchivePage = true ][, array<string|int, string> $years = [] ]) : void
Parameters
$bid : int
$categoryIds : array<string|int, int>
$startDates : array<string|int, mixed>
$maxPages : array<string|int, mixed>
$generateMonthArchivePage : bool = true
$years : array<string|int, string> = []

processExportCategoryPagenation()

カテゴリーページの書き出し

protected processExportCategoryPagenation(int $bid, array<string|int, int> $categoryIds, array<string|int, int> $maxPages) : void
Parameters
$bid : int
$categoryIds : array<string|int, int>
$maxPages : array<string|int, int>

processExportCategoryTop()

カテゴリートップの書き出し

protected processExportCategoryTop(int $bid) : void
Parameters
$bid : int

processExportEntry()

エントリーの書き出し

protected processExportEntry(int $bid) : void
Parameters
$bid : int

processExportPagenation()

ページの書き出し

protected processExportPagenation(int $bid, int $maxPageCount) : void
Parameters
$bid : int
$maxPageCount : int

processExportTheme()

テーマのテンプレート書き出し

protected processExportTheme(int $bid, array<string|int, mixed> $themes) : void
Parameters
$bid : int
$themes : array<string|int, mixed>

processExportThemeAssets()

テーマのアセット書き出し

protected processExportThemeAssets(array<string|int, string> $themes) : mixed
Parameters
$themes : array<string|int, string>

processExportTop()

トップページの書き出し

protected processExportTop(int $bid) : void
Parameters
$bid : int

processResolvCssPath()

css の url属性のパス解決

protected processResolvCssPath(array<string|int, string> $themes) : mixed
Parameters
$themes : array<string|int, string>

resolvePathInCss()

css の url属性のパス解決

protected resolvePathInCss(string $theme) : void
Parameters
$theme : string

        
On this page

Search results