a-blog cms PHP API Reference

Preview extends Facade
in package

Table of Contents

Properties

$container  : Container

Methods

__callStatic()  : mixed
clearInstance()  : void
テスト用: ファサードがキャッシュしている解決済みインスタンスを破棄する。
endPreviewMode()  : void
expiredShareUrl()  : void
getFakeUserAgent()  : string|false
getInstance()  : mixed
get service instance
getPreviewShareTpl()  : string
getSharePreviewUrl()  : string
getShareUrl()  : string
isPreviewMode()  : bool
isPreviewShareAdmin()  : bool
isValidPreviewSharingUrl()  : bool
setContainer()  : void
startPreviewMode()  : void
swap()  : void
テスト用: サービスインスタンスをスタブ等へ差し替える。
getServiceAlias()  : string
getServiceInstance()  : mixed
isCache()  : bool

Properties

Methods

__callStatic()

public static __callStatic(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : string
$arguments : array<string|int, mixed>

clearInstance()

テスト用: ファサードがキャッシュしている解決済みインスタンスを破棄する。

public static clearInstance() : void

isCache() が true のファサードは解決済みインスタンスを静的プロパティ $instance に 保持するため、コンテナ側だけを差し替えても反映されない。本メソッドでキャッシュを 無効化し、次回アクセスでコンテナから再解決させる。

endPreviewMode()

public static endPreviewMode() : void

プレビューモードを終了

expiredShareUrl()

public static expiredShareUrl() : void

期限切れの共有URLを削除

getFakeUserAgent()

public static getFakeUserAgent() : string|false

偽装ユーザーエージェントの取得

Return values
string|false

getInstance()

get service instance

public static getInstance() : mixed

getPreviewShareTpl()

public static getPreviewShareTpl() : string

プレビュー共有URLのテンプレートを取得 *

Return values
string

getSharePreviewUrl()

public static getSharePreviewUrl() : string

共有URLで実際に表示するiFrameのURL

Return values
string

getShareUrl()

public static getShareUrl(string $url[, bool $lifetime = = 'false' ]) : string

プレビュー共有URLの取得

Parameters
$url : string
$lifetime : bool = = 'false'
Return values
string

isPreviewMode()

public static isPreviewMode() : bool

プレビューモード中か判定

Return values
bool

isPreviewShareAdmin()

public static isPreviewShareAdmin(string $admin) : bool

プレビュー共有URLの管理者か判定

Parameters
$admin : string
Return values
bool

isValidPreviewSharingUrl()

public static isValidPreviewSharingUrl() : bool

プレビュー共有モードになれるか判定

Return values
bool

startPreviewMode()

public static startPreviewMode(string $fakeUserAgent, string $token) : void

プレビューモードを開始

Parameters
$fakeUserAgent : string
$token : string

swap()

テスト用: サービスインスタンスをスタブ等へ差し替える。

public static swap(object $instance) : void

DI コンテナのエイリアスを差し替えたうえで、ファサードがキャッシュしている解決済み インスタンス(isCache() が true の場合)を破棄し、次回アクセス時に差し替え後の インスタンスを再解決させる。テスト後は元のインスタンスを渡して再度呼び出し復元する。

Parameters
$instance : object

getServiceAlias()

protected static getServiceAlias() : string
Return values
string

getServiceInstance()

protected static getServiceInstance(string $alias) : mixed
Parameters
$alias : string

isCache()

protected static isCache() : bool
Return values
bool

        
On this page

Search results