a-blog cms PHP API Reference

Common extends Facade
in package

Class Common

Table of Contents

Properties

$container  : Container
$instance  : mixed

Methods

__callStatic()  : mixed
addCsrfToken()  : string
addSecurityHeader()  : void
backgroundRedirect()  : void
camelize()  : string
checkCsrfToken()  : bool
clientCacheHeader()  : void
convertRelativeUrlsToAbsolute()  : string
createCsrfToken()  : string
csrfTokenExists()  : bool
decrypt()  : string
deleteField()  : void
deleteFieldCache()  : void
download()  : never
encrypt()  : string
exceptionArray()  : array<string|int, mixed>
extract()  : Field
fixAliasPath()  : string
flushCache()  : void
genPass()  : string
getAppSalt()  : string
getCurrentSalt()  : string
getDeleteField()  : string
getEncryptIv()  : string
getHttpHeader()  : string
getInheritedThemes()  : array<string|int, string>
getInstance()  : mixed
get service instance
getJsModules()  : array<string|int, mixed>
getMailTxt()  : string
getMailTxtFromTxt()  : string
getPreviousSalt()  : string
getTagsFromString()  : array<string|int, string>
getUriObject()  : Field
isAuthorizedAjaxRequest()  : bool
isForceV1Build()  : bool
isLocalPrivateStorage()  : bool
isLocalPublicStorage()  : bool
isManagedDomain()  : bool
isSafeUrl()  : bool
isV2Module()  : bool
loadBlogFulltext()  : string
loadCategoryFulltext()  : string
loadEntryFulltext()  : string
loadField()  : Field
loadUserFulltext()  : string
logLockPost()  : void
parseMarkdown()  : string
replaceDeliveryUrl()  : string
replaceDeliveryUrlAll()  : string
resolveUrl()  : string
responseJson()  : never
saveCache()  : void
saveField()  : bool
saveFulltext()  : void
setContainer()  : void
setForceV1Build()  : void
setSafeHeadersWithoutCache()  : void
setV2Module()  : void
toAbsoluteUrl()  : string
uploadAssetDirectory()  : void
validateFileUpload()  : void
validateLockPost()  : bool
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>

addCsrfToken()

public static addCsrfToken(string $tpl) : string

CSRFトークンをテンプレートに追加する

Parameters
$tpl : string
Return values
string

addSecurityHeader()

public static addSecurityHeader() : void

セキュリティヘッダーを追加する

backgroundRedirect()

public static backgroundRedirect(string $url) : void

すぐにリダイレクトし、同一プロセスのバックグラウンドで処理を実行

Parameters
$url : string

camelize()

public static camelize(string $str) : string

文字列をキャメルケースに変換する

Parameters
$str : string
Return values
string

checkCsrfToken()

public static checkCsrfToken(string $token) : bool

CSRFトークンが有効か確認する

Parameters
$token : string
Return values
bool

clientCacheHeader()

public static clientCacheHeader([bool $noCache = = 'false' ]) : void

クライアントキャッシュヘッダーを設定する

Parameters
$noCache : bool = = 'false'

convertRelativeUrlsToAbsolute()

public static convertRelativeUrlsToAbsolute(string $html, string $baseUrl) : string

HTML内の相対URLを絶対URLに変換

Parameters
$html : string
$baseUrl : string
Return values
string

createCsrfToken()

public static createCsrfToken() : string

CSRFトークンを作成する

Return values
string

csrfTokenExists()

public static csrfTokenExists() : bool

CSRFトークンがセッションに存在するか確認する

Return values
bool

decrypt()

public static decrypt(string $cipherText, string $iv) : string

暗号化された文字列を復号化する

Parameters
$cipherText : string
$iv : string
Return values
string

deleteField()

public static deleteField(string $type, int $id[, int|null $rvid = = 'null' ][, int|null $blogId = = 'null' ]) : void

カスタムフィールドを削除する

Parameters
$type : string
$id : int
$rvid : int|null = = 'null'
$blogId : int|null = = 'null'

deleteFieldCache()

public static deleteFieldCache(string $type, int $id[, int|null $rvid = = 'null' ]) : void

フィールドキャッシュを削除する

Parameters
$type : string
$id : int
$rvid : int|null = = 'null'

download()

public static download(string $path, string $fileName[, string|bool $extension = = 'false' ][, bool $remove = = 'false' ][, Filesystem $storage = = 'null' ]) : never

ファイルをダウンロードする

Parameters
$path : string
$fileName : string
$extension : string|bool = = 'false'
$remove : bool = = 'false'
$storage : Filesystem = = 'null'
Return values
never

encrypt()

public static encrypt(string $string, string $iv) : string

文字列を暗号化する

Parameters
$string : string
$iv : string
Return values
string

exceptionArray()

public static exceptionArray(Throwable $th[, array<string|int, mixed> $add = = '[]' ]) : array<string|int, mixed>

エラー情報を配列に変換する

Parameters
$th : Throwable
$add : array<string|int, mixed> = = '[]'
Return values
array<string|int, mixed>

extract()

public static extract([string $scp = = '\'field\'' ][, ACMS_Validator|null $V = = 'null' ][, Field|null $deleteField = = 'null' ]) : Field

フィールドを取得する

Parameters
$scp : string = = '\'field\''
$V : ACMS_Validator|null = = 'null'
$deleteField : Field|null = = 'null'
Return values
Field

fixAliasPath()

public static fixAliasPath(string $txt) : string

管理画面でテンプレート直で書かれているパスを、エイリアスを含んだURLに修正

Parameters
$txt : string
Return values
string

flushCache()

public static flushCache() : void

フィールドキャッシュをフラッシュする

genPass()

public static genPass(int $len) : string

パスワードを生成する

Parameters
$len : int
Return values
string

getAppSalt()

public static getAppSalt() : string

アプリケーションのソルトを取得

Return values
string

getCurrentSalt()

public static getCurrentSalt() : string

現在のソルトを取得

Return values
string

getDeleteField()

public static getDeleteField() : string

extract()後の削除フィールドを取得

Return values
string

getEncryptIv()

public static getEncryptIv() : string

暗号化用のIVを取得する

Return values
string

getHttpHeader()

public static getHttpHeader(string $name) : string

HTTPヘッダーを取得する

Parameters
$name : string
Return values
string

getInheritedThemes()

public static getInheritedThemes(string $theme) : array<string|int, string>

指定されたテーマの継承テーマ・システムテーマすべてのテーマの配列を取得する

Parameters
$theme : string
Return values
array<string|int, string>

getInstance()

get service instance

public static getInstance() : mixed

getJsModules()

public static getJsModules() : array<string|int, mixed>

acms.js のクエリを取得する

Return values
array<string|int, mixed>

getMailTxt()

public static getMailTxt(string $path, Field $field[, string|null $charset = = 'null' ]) : string

メールテキストを取得する

Parameters
$path : string
$field : Field
$charset : string|null = = 'null'
Return values
string

getMailTxtFromTxt()

public static getMailTxtFromTxt(string $txt, Field $field) : string

テキストからメールテキストを取得する

Parameters
$txt : string
$field : Field
Return values
string

getPreviousSalt()

public static getPreviousSalt() : string

1つ前のソルトを取得

Return values
string

getTagsFromString()

public static getTagsFromString(string $string[, bool $checkReserved = = 'true' ]) : array<string|int, string>

文字列からタグを取得する

Parameters
$string : string
$checkReserved : bool = = 'true'
Return values
array<string|int, string>

getUriObject()

public static getUriObject(Field $Post) : Field

フォームのURIオブジェクトを取得する

Parameters
$Post : Field
Return values
Field

isAuthorizedAjaxRequest()

public static isAuthorizedAjaxRequest([int $level = = '1' ]) : bool

Ajaxアクセスが許可されているか確認する

Parameters
$level : int = = '1'
Return values
bool

isForceV1Build()

public static isForceV1Build() : bool

強制的にV1ビルドを行うか判定

Return values
bool

isLocalPrivateStorage()

public static isLocalPrivateStorage() : bool

プライベートストレージの設定がローカルかどうか

Return values
bool

isLocalPublicStorage()

public static isLocalPublicStorage() : bool

パブリックストレージの設定がローカルかどうか

Return values
bool

isManagedDomain()

public static isManagedDomain(string $domain[, array<string|int, mixed> $additionalDomains = = '[]' ]) : bool

指定されたドメインが管理ドメインかどうかを判定

Parameters
$domain : string
$additionalDomains : array<string|int, mixed> = = '[]'
Return values
bool

isSafeUrl()

public static isSafeUrl(string $url) : bool

a-blog cms で管理しているドメインのURLかチェックする

Parameters
$url : string
Return values
bool

isV2Module()

public static isV2Module() : bool

V2モジュールとして実行中か判定

Return values
bool

loadBlogFulltext()

public static loadBlogFulltext(int $bid) : string

ブログのフルテキストを取得する

Parameters
$bid : int
Return values
string

loadCategoryFulltext()

public static loadCategoryFulltext(int $cid) : string

カテゴリーのフルテキストを取得する

Parameters
$cid : int
Return values
string

loadEntryFulltext()

public static loadEntryFulltext(int $eid) : string

エントリーのフルテキストを取得する

Parameters
$eid : int
Return values
string

loadField()

public static loadField([int|null $bid = = 'null' ][, int|null $uid = = 'null' ][, int|null $cid = = 'null' ][, int|null $mid = = 'null' ][, int|null $eid = = 'null' ][, string|null $unitId = = 'null' ][, int|null $rvid = = 'null' ][, bool $rewrite = = 'false' ]) : Field

カスタムフィールドを取得する

Parameters
$bid : int|null = = 'null'
$uid : int|null = = 'null'
$cid : int|null = = 'null'
$mid : int|null = = 'null'
$eid : int|null = = 'null'
$unitId : string|null = = 'null'
$rvid : int|null = = 'null'
$rewrite : bool = = 'false'
Return values
Field

loadUserFulltext()

public static loadUserFulltext(int $uid) : string

ユーザーのフルテキストを取得する

Parameters
$uid : int
Return values
string

logLockPost()

public static logLockPost(string $lockKey) : void

ロックポストをログに記録する

Parameters
$lockKey : string

parseMarkdown()

public static parseMarkdown(string $txt) : string

Markdownを解析する

Parameters
$txt : string
Return values
string

replaceDeliveryUrl()

public static replaceDeliveryUrl(string $url) : string

メディアの配信先URLを書き換え

Parameters
$url : string
Return values
string

replaceDeliveryUrlAll()

public static replaceDeliveryUrlAll(string $txt) : string

メディアの配信先URLを書き換え(全て)

Parameters
$txt : string
Return values
string

resolveUrl()

public static resolveUrl(string $path[, string $offset = = '\'\'' ]) : string

V2モジュール、V2APIの場合は絶対URLに変換する

Parameters
$path : string
$offset : string = = '\'\''
Return values
string

responseJson()

public static responseJson(array<string|int, mixed> $data) : never

JSON形式のレスポンスを返す

Parameters
$data : array<string|int, mixed>
Return values
never

saveCache()

public static saveCache(string $chid, string $contents, string $mime) : void

キャッシュを保存する

Parameters
$chid : string
$contents : string
$mime : string

saveField()

public static saveField(string $type, ($type is "unit_id" ? string : int) $id[, Field|null $Field = = 'null' ][, Field|null $deleteField = = 'null' ][, int|null $rvid = = 'null' ][, int|null $targetBid = = 'null' ]) : bool

カスタムフィールドを保存する

Parameters
$type : string
$id : ($type is "unit_id" ? string : int)
$Field : Field|null = = 'null'
$deleteField : Field|null = = 'null'
$rvid : int|null = = 'null'
$targetBid : int|null = = 'null'
Return values
bool

saveFulltext()

public static saveFulltext(string $type, int $id[, string $fulltext = = 'null' ][, int|null $targetBid = = 'null' ]) : void

フルテキストを保存する

Parameters
$type : string
$id : int
$fulltext : string = = 'null'
$targetBid : int|null = = 'null'

setForceV1Build()

public static setForceV1Build(bool $isForceV1Build) : void

強制的にV1ビルドを行うか設定

Parameters
$isForceV1Build : bool

setSafeHeadersWithoutCache()

public static setSafeHeadersWithoutCache([int $code = = '200' ][, string $mime = = '\'text/html\'' ]) : void

安全なヘッダーを設定し、クライアントキャッシュを無効化するヘッダーを設定する

Parameters
$code : int = = '200'
$mime : string = = '\'text/html\''

setV2Module()

public static setV2Module(bool $isV2Module) : void

V2モジュールとして実行中か設定

Parameters
$isV2Module : bool

toAbsoluteUrl()

public static toAbsoluteUrl(string $path[, string $offset = = '\'\'' ], bool $strict) : string

絶対URLに変換する

Parameters
$path : string
$offset : string = = '\'\''
$strict : bool
Return values
string

uploadAssetDirectory()

public static uploadAssetDirectory(string $from, string $to, bool $isPublic) : void

アセットディレクトリをアップロードする

Parameters
$from : string
$to : string
$isPublic : bool

validateFileUpload()

public static validateFileUpload(string $name) : void

ファイルアップロードを検証する

Parameters
$name : string

validateLockPost()

public static validateLockPost(string $lockKey[, int $trialTime = = '5' ][, int $trialNumber = = '5' ][, int $lockTime = = '15' ][, bool $remoteAddr = = 'true' ]) : bool

ロックポストを検証する

Parameters
$lockKey : string
$trialTime : int = = '5'
$trialNumber : int = = '5'
$lockTime : int = = '15'
$remoteAddr : bool = = 'true'
Return values
bool

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