baserCMS クラスリファレンス

BcLang extends BcAbstractDetector
in package

Class BcLang

Table of Contents

Properties

$decisionKeys  : array<string|int, mixed>
判定キーワード
$name  : string
名前
$type  : string
検出器タイプ
$_configName  : string
設定ファイルのキー名
$_detectors  : array<string|int, mixed>
検出器リスト

Methods

__construct()  : mixed
コンストラクタ
find()  : BcAbstractDetector|null
名前をキーとしてインスタンスを探す
findAll()  : array<string|int, BcAbstractDetector>
設定ファイルに存在する全てのインスタンスを返す
findCurrent()  : BcAbstractDetector|null
現在の環境の判定キーの値に合致するインスタンスを返す
getDetectorRegex()  : string
判定用正規表現を取得
isMatchDecisionKey()  : bool
キーワードを含むかどうかを判定
parseLang()  : array<string|int, mixed>|string
言語データを解析する
_getDefaultConfig()  : array<string|int, mixed>
デフォルトの設定値を取得
_setConfig()  : void
設定

Properties

$decisionKeys

判定キーワード

public array<string|int, mixed> $decisionKeys

$type

検出器タイプ

public string $type = 'lang'

$_configName

設定ファイルのキー名

protected static string $_configName = 'BcLang'

$_detectors

検出器リスト

protected static array<string|int, mixed> $_detectors = null

Methods

__construct()

コンストラクタ

public __construct(string $name, array<string|int, mixed> $config) : mixed
Parameters
$name : string

名前

$config : array<string|int, mixed>

設定の配列

Tags
checked
noTodo

getDetectorRegex()

判定用正規表現を取得

public getDetectorRegex() : string
Tags
checked
noTodo
Return values
string

isMatchDecisionKey()

キーワードを含むかどうかを判定

public isMatchDecisionKey() : bool
Tags
checked
noTodo
Return values
bool

parseLang()

言語データを解析する

public static parseLang( $acceptLanguage) : array<string|int, mixed>|string

最優先の言語のみ対応

Parameters
$acceptLanguage :
Tags
checked
noTodo
Return values
array<string|int, mixed>|string

_getDefaultConfig()

デフォルトの設定値を取得

protected _getDefaultConfig() : array<string|int, mixed>
Tags
checked
noTodo
Return values
array<string|int, mixed>

_setConfig()

設定

protected _setConfig(array<string|int, mixed> $config) : void
Parameters
$config : array<string|int, mixed>

設定の配列

Tags
checked
noTodo

        
On this page

Search results