a-blog cms PHP API Reference

Blog extends Facade
in package

Class Blog

Table of Contents

Properties

$container  : Container
$instance  : mixed

Methods

__callStatic()  : mixed
canBulkChangeStatus()  : bool
canChangeMaintenanceMode()  : bool
canCreate()  : bool
canDelete()  : bool
canManageStructure()  : bool
canTransitionStatus()  : bool
canUpdate()  : bool
clearInstance()  : void
テスト用: ファサードがキャッシュしている解決済みインスタンスを破棄する。
getInstance()  : mixed
get service instance
hasDescendantBlogs()  : bool
isCodeExists()  : bool
isDomain()  : bool
isValidStatus()  : bool
setContainer()  : void
swap()  : void
テスト用: サービスインスタンスをスタブ等へ差し替える。
getServiceAlias()  : string
getServiceInstance()  : mixed
isCache()  : bool

Properties

$instance

protected static mixed $instance

Methods

__callStatic()

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

canBulkChangeStatus()

public static canBulkChangeStatus(int $blogId, string $toStatus) : bool

指定ブログ配下のステータス一括変更を行えるか

Parameters
$blogId : int
$toStatus : string
Return values
bool

canChangeMaintenanceMode()

public static canChangeMaintenanceMode(int $blogId) : bool

指定ブログのメンテナンスモードを切り替えできるか

Parameters
$blogId : int
Return values
bool

canCreate()

public static canCreate(int $blogId) : bool

指定ブログ配下に新規ブログを作成できるか

Parameters
$blogId : int
Return values
bool

canDelete()

public static canDelete(int $blogId) : bool

指定ブログを削除できるか

Parameters
$blogId : int
Return values
bool

canManageStructure()

public static canManageStructure(int $blogId) : bool

指定ブログ配下のツリー / コンフィグセット一括操作を行えるか

Parameters
$blogId : int
Return values
bool

canTransitionStatus()

public static canTransitionStatus(int $blogId, string $toStatus) : bool

ステータス遷移が業務ルール上許可されるか

Parameters
$blogId : int
$toStatus : string
Return values
bool

canUpdate()

public static canUpdate(int $blogId) : bool

指定ブログを編集できるか

Parameters
$blogId : int
Return values
bool

clearInstance()

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

public static clearInstance() : void

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

getInstance()

get service instance

public static getInstance() : mixed

hasDescendantBlogs()

public static hasDescendantBlogs(int $blogId) : bool

指定したブログが子孫ブログを持っているか

Parameters
$blogId : int
Return values
bool

isCodeExists()

public static isCodeExists(string $domain, string $code[, int $bid = = 'null' ][, int $aid = = 'null' ]) : bool

ブログコードの存在をチェック

Parameters
$domain : string
$code : string
$bid : int = = 'null'
$aid : int = = 'null'
Return values
bool

isDomain()

public static isDomain(string $domain, int $bid[, bool $isAlias = = 'false' ][, bool $update = = 'false' ]) : bool

ライセンスされているドメインかチェック

Parameters
$domain : string
$bid : int
$isAlias : bool = = 'false'
$update : bool = = 'false'
Return values
bool

isValidStatus()

public static isValidStatus(string $val[, bool $update = = 'false' ]) : bool

指定したブログのステータスが設定できるか

Parameters
$val : string
$update : bool = = 'false'
Return values
bool

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