\BEAR_Ro_Shutdown

onShutdownプロトタイプリソース

shutdown時にリクエストされるリソースのプロトタイプクラスです。

Summary

Methods
Properties
Constants
__construct()
onInject()
setConfig()
getConfig()
setService()
set()
request()
onShutdown()
register()
No public properties found
No constants found
_exception()
$_config
N/A
No private methods found
$_ro
N/A

Properties

$_config

$_config : array

Class config

Type

array

$_ro

$_ro : array

Shutdown時にアクセスするリソース

Type

array — BEAR_Ro_Prototypeのコレクション

Methods

__construct()

__construct(array  $config) 

Universal constructor

設定を_configプロパティに代入します。

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

サービス

set()

set(\BEAR_Ro_Prototype  $prototypeRo) : void

Shutdown時に実行されるリソースプロトタイプをセット

スクリプトShutdown時に実行されるタスクまたはリソースリクエストをセットします。

Parameters

\BEAR_Ro_Prototype $prototypeRo

request()

request() : void

Shutdown時にリクエストされるリソースのリクエスト

onShutdown()

onShutdown() : void

shutdown登録される関数

このメソッドをregister_shutdown_functionしておくと
shutdown時にrequest()メソッドがコールされます。

register()

register() : \BEAR_Ro_Shutdown

Register shutdown function once.

Returns

\BEAR_Ro_Shutdown

_exception()

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

例外の作成

Parameters

string $msg

例外メッセージ

array $config

例外config

Returns

\BEAR_Exception