PHP Class BcThemeConfigReader

Inheritance: implements ConfigReaderInterface
Afficher le fichier Open project: baserproject/basercms Class Usage Examples

Méthodes publiques

Свойство Type Description
$variables array 保存する変数

Protected Properties

Свойство Type Description
$_path string テーマディレクトリ

Méthodes publiques

Méthode Description
__construct ( string $path = null ) コンストラクタ
createContents ( array $data ) : string 与えられた連想配列からPHPコードを生成
dump ( string $key, array $data ) : integer 与えられた連想配列を設定ファイルにPHPコードとして保存する 追記ではなく上書きする
read ( string $key ) : array 指定されたテーマ名の設定ファイルを読み込む

Méthodes protégées

Méthode Description
_getFilePath ( string $key ) : string 与えられたテーマのディレクトリ名に対応する設定ファイルのパスを取得

Method Details

__construct() public méthode

コンストラクタ
public __construct ( string $path = null )
$path string テーマディレクトリのパス. デフォルトは WWW_ROOT . 'theme' . DS

_getFilePath() protected méthode

与えられたテーマのディレクトリ名に対応する設定ファイルのパスを取得
protected _getFilePath ( string $key ) : string
$key string テーマ名(ディレクトリ名)
Résultat string 設定ファイルのフルパス

createContents() public méthode

与えられた連想配列からPHPコードを生成
public createContents ( array $data ) : string
$data array 設定の連想配列
Résultat string

dump() public méthode

与えられた連想配列を設定ファイルにPHPコードとして保存する 追記ではなく上書きする
public dump ( string $key, array $data ) : integer
$key string テーマ名(ディレクトリ名)
$data array 保存する設定の連想配列
Résultat integer 保存されたバイト数

read() public méthode

指定されたテーマ名の設定ファイルを読み込む
public read ( string $key ) : array
$key string テーマ名(ディレクトリ名)
Résultat array 設定の連想配列

Property Details

$_path protected_oe property

テーマディレクトリ
protected string $_path
Résultat string

$variables public_oe static_oe property

保存する変数
public static array $variables
Résultat array