Constants

KEY_CLICK_NAME

KEY_CLICK_NAME

アクティブリンク・クリックネーム クエリーキー

KEY_CLICK_VALUE

KEY_CLICK_VALUE

アクティブリンク・クリックバリュ クエリーキー

CONFIG_MODE_HTML

CONFIG_MODE_HTML

ページモード - HTML

CONFIG_MODE_RESOURCE

CONFIG_MODE_RESOURCE

ページモード - リソース

Properties

$header

$header : \BEAR_Page_Header

ヘッダーオブジェクト

Type

\BEAR_Page_Header

$_headers

$_headers : array

Pageリソースヘッダー

Type

array

$_body

$_body : string

Pageリソースボディ

Type

string

$_args

$_args : array

onInit()等の引数

Type

array

$_pageLog

$_pageLog : array

ページ実行ログ

Type

array

$_ro

$_ro : array

ページにセットされたリソース

Type

array

$_pageRo

$_pageRo : \BEAR_Ro

出力されたページをリソースオブジェクトにしたもの

Type

\BEAR_Ro

$_ua

$_ua : string

UAコード

Type

string

$_session

$_session : \BEAR_Session

セッション

Type

\BEAR_Session

$_resource

$_resource : \BEAR_Resource

リソースアクセス

Type

\BEAR_Resource

$_view

$_view : mixed

View

Type

mixed

$_config

$_config : array

Class config

Type

array

$_onClick

$_onClick : string

Click名

Type

string

$_values

$_values : array

ページにセットされたバリュー

Type

array

Methods

getOnClick()

getOnClick() : string

クリックをゲット

Returns

string

setOnClick()

setOnClick(string  $onClick) : void

クリックをセット

Parameters

string $onClick

クリック名

__construct()

__construct(array  $config) 

Universal constructor

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

Parameters

array $config

ユーザー設定値

onInject()

onInject() : void

Inject

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

onInit()

onInit(array  $args) : void

ページハンドラ

onInject()で注入された$argsやプロパティを利用して
メソッド内でリソースリクエストを行いviewにsetします。

Parameters

array $args

ページ引数

onOutput()

onOutput() : void

ページ表示ハンドラ

onInit()でページにsetされた値をこのメソッド内で出力します。
このメソッドはフォームのバリデーションが行われ、その結果が全てOKだった時のみ_呼び出されません_

onAction()

onAction(array  $submit) : void

バリデーションOKハンドラ

フォーム送信されバリデーションOKの場合にonInit()の後にコールされます。
$submitはQuickFormに追加されバリデーションされた値のうち最初のエレメントが_でないもののみが渡されます。
例えば0か1のみがセレクト可能なエレメントがあっととして、ルールを追加しなくても
"2"がサブミットされた場合には$submitに渡されません。

Parameters

array $submit

フォーム内容

getPageRo()

getPageRo() : \BEAR_Ro

ページをリソースオブジェクトとして取得

モードに応じてページをリソースとして取得します。

$this->_config['mode']

'resource'
  $this->set()でアサインされたリソース値がリソースボディになります。listの形式です
'page'
  $this->display()で出力されるHTTP(ヘッダー、ボディー)がリソースのヘッダー、ボディーになります。

                
                
                                    

Returns

\BEAR_Ro

fetch()

fetch(string  $tplName = null) : string

HTML文字列取得

BEAR_Page::displayと違いHTML出力の代わりに文字列を取得します。

Parameters

string $tplName

テンプレートファイル名

Returns

string

set()

set(mixed  $key, mixed  $value = null) : void

ページバリューをセット

Parameters

mixed $key

キー string

mixed $value

setRo()

setRo(string  $key, \BEAR_Ro  $ro) : void

ページにリソースをセット

Parameters

string $key

リソース名

\BEAR_Ro $ro

リソースオブジェクト

get()

get(string  $key = null) : mixed

ページ変数取得

Parameters

string $key

変数キー

Returns

mixed

setHeader()

setHeader(mixed  $header) : void

ヘッダー出力

ヘッダーを出力用にバッファリングします。
引数は配列または文字列で指定できます。
スタティック変数として保存されBEAR_Mainで出力バッファを
フラッシュする時に送出されます。
同じ<
/pre>

                                    

Parameters

mixed $header

HTTPヘッダー

flushHeader()

flushHeader() : void

ヘッダーのフラッシュ

ページにヘッダーを取得します。
通常はページ出力時に自動で出力されます。

output()

output(string  $format = 'print', array  $options = array()) 

HTTP出力

指定されたフォーマットでHTTP出力します。 指定フォーマットのアウトプットファイルを以下の順(BEAR, App)で探します。

1) /BEAR/Resource/output/ 2) /App/output/

Parameters

string $format

フォーマット

array $options

オプション

Throws

\BEAR_Exception

injectArg()

injectArg(string  $key, mixed  $val, mixed  $default = null) : void

ページ引数への変数インジェクト

Parameters

string $key

ページ引数キー

mixed $val

ページ引数にインジェクトする値

mixed $default

デフォルト

injectGet()

injectGet(string  $key, string  $getKey = null, mixed  $default = null) : void

$GETをインジェクト

URLクエリーの$_GETをonInit($args)の$argsにインジェクトします。

Injectするキー

Parameters

string $key
string $getKey

$_GETキー

mixed $default

デフォルト

injectArgs()

injectArgs(array  $args) : void

ページ引数へ連想配列でインジェクト

Parameters

array $args

引数全部

injectAjaxValues()

injectAjaxValues() : void

AJAXリクエストの値をインジェクト

AJAXリクエストの値をonInit($args)の$argsにインジェクトします。

injectAjaxRequest()

injectAjaxRequest() : void

AJAXリクエストの値をインジェクト

getArgs()

getArgs() : array

ページ引数の取得

Returns

array —

ページ引数

end()

end(integer  $httpCode = 200, string  $msg = 'Error') : void

ページ終了

ページを途中で終了します。コードとメッセージを指定すると指定HTTPコードのヘッダーと出力画面で終了します。

Parameters

integer $httpCode

HTTPコード

string $msg

HTTPコードメッセージ(200以外)

Throws

\Panda_Exception

getValues()

getValues() : array

setした値をすべて取得

Returns

array

getRo()

getRo() : array

setしたRoを全て取得

Returns

array

getCacheKey()

getCacheKey() : mixed

ページキャッシュのキーを生成

Returns

mixed —

(bool) falseキャッシュ不可 | (string) キャッシュキー

clearPageCache()

clearPageCache() : void

ページキャッシュクリア

setPrototypeRo()

setPrototypeRo() : void

プロトタイプリソースをページバリューにセット

リソースのsetでスタックに積まれた複数のプロトタイプリソースを取り出しページにsetします。

'lazy' lazy Roとしてsetします。viewで出現したタイミングで実リソースリクエストが行われます。 'object' roオブジェクトとしてsetされます。 'value' 変数(多くの場合連想配列)としてsetされます。

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

サービス

_viewAdapter()

_viewAdapter() : \BEAR_View_Adapter

Viewアダプター

Viewにページバリューをアサインして、Viewを返します。
受け取ったクラインとではfetchかdisplayが利用可能です。
UAスニッフィングがtrueならエージェント

Returns

\BEAR_View_Adapter

_outputHttp()

_outputHttp(\BEAR_Ro  $ro) : void

ページリソースをHTTP出力します

Parameters

\BEAR_Ro $ro

_exception()

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

例外の作成

Parameters

string $msg

例外メッセージ

array $config

例外config

Returns

\BEAR_Exception