\BEAR_View

ビュー

Factoryパターンのためのクラスです。 このクラスを継承して実装されたクラスはBEAR::dependency()でコールされたときに factory()メソッドが返した物がインスタンスとなります。 利用する側はインスタンスの生成方法を知る事がなくfactoryパターンで インスタンス提供ができます。

Summary

Methods
Properties
Constants
factory()
__construct()
onInject()
setConfig()
getConfig()
setService()
No public properties found
No constants found
_exception()
$_config
N/A
No private methods found
No private properties found
N/A

Properties

$_config

$_config : array

Class config

Type

array

Methods

factory()

factory() : array

テンプレート名の取得

Returns

array

__construct()

__construct(array  $config) 

Constructor

Parameters

array $config

onInject()

onInject() : void

Inject

設定にしたがってサービスをインジェクトします。

setConfig()

setConfig(mixed  $config, mixed  $values = null) : self

Set config

Parameters

mixed $config

(string) 設定キー | (array) 設定配列

mixed $values

(string) $configの時の設定値

Returns

self

getConfig()

getConfig(string  $key = null) : mixed

Get config

Parameters

string $key

設定キー、指定なければ全ての設定を取得

Returns

mixed

setService()

setService(string  $name, mixed  $service) : void

Set service

Parameters

string $name

サービスキー

mixed $service

サービス

_exception()

_exception(string  $msg, array  $config = array()) : \BEAR_Exception

例外の作成

Parameters

string $msg

例外メッセージ

array $config

例外config

Returns

\BEAR_Exception