a-blog cms PHP API Reference

SiteSeedDestination
in package

FinalYes

SiteSeeder がファイル群をコピーする宛先パスの集合 (不変)

本番実行時は SiteSeedDestination::fromScriptDir() で SCRIPT_DIR 配下 (archives/ / media/ / storage/ / themes/) を使う。

テスト時は SiteSeedDestination::underRoot($tmpDir) で一時ディレクトリを指す インスタンスを渡して副作用を閉じ込める。

Table of Contents

Properties

$archivesDir  : string
$mediaDir  : string
$storageDir  : string
$themesDir  : string

Methods

__construct()  : mixed
fromScriptDir()  : self
SCRIPT_DIR 配下の標準パスで初期化する (本番 / dev デフォルト)
underRoot()  : self
任意のルートディレクトリ配下に配置する (テスト用途)

Properties

Methods

__construct()

public __construct(string $archivesDir, string $mediaDir, string $storageDir, string $themesDir) : mixed
Parameters
$archivesDir : string
$mediaDir : string
$storageDir : string
$themesDir : string

fromScriptDir()

SCRIPT_DIR 配下の標準パスで初期化する (本番 / dev デフォルト)

public static fromScriptDir() : self
Return values
self

underRoot()

任意のルートディレクトリ配下に配置する (テスト用途)

public static underRoot(string $root) : self
Parameters
$root : string
Return values
self

        
On this page

Search results