Class Ethna_Controller

Description

コントローラクラス

  • author: Masaki Fujimoto <fujimoto@php.net>
  • todo: gatewayでswitchしてるところがダサダサ
  • access: public

Located in /class/Controller.php (line 22)


	
			
Variable Summary
 mixed $action
 mixed $action_cli
 mixed $action_form
 mixed $action_name
 string $appid
 string $base
 mixed $class
 mixed $config
 mixed $db
 mixed $directory
 mixed $dsn
 mixed $ext
 mixed $filter
 mixed $forward
 mixed $gateway
 mixed $locale
 mixed $logger
 mixed $manager
 mixed $plugin
 mixed $renderer
 mixed $url
 mixed $view
Method Summary
 static mixed checkActionName (string $action_name)
 static mixed checkAppId (string $id)
 static mixed checkViewName (string $view_name)
 static void main (string $class_name, [mixed $action_name = ""], [mixed $fallback_action_name = ""])
 static void main_CLI (string $class_name, string $action_name, [bool $enable_filter = true])
 static void main_SOAP (string $class_name, [mixed $action_name = ""], [mixed $fallback_action_name = ""])
 static void main_XMLRPC ( $class_name)
 Ethna_Controller __construct ([ $gateway = GATEWAY_WWW])
 string actionClassToName (string $class_name)
 string actionFormToName (string $class_name)
 void end ()
 void ethnaManagerCheckErrorMsg ( $action_name)
 string forwardPathToName (string $forward_path)
 string getActionClassName (string $action_name)
 string getActiondir ([ $gateway = null])
 string getActionFormName (string $action_name)
 void getActionRequest (string $action, [string $type = "hidden"])
 string getAppId ()
 string getBasedir ()
 bool getCLI ()
 string getClientEncoding ()
 string getDBType ([string $db_key = null])
 string getDefaultActionClass (string $action_name, [ $gateway = null])
 string getDefaultActionPath (string $action_name)
 string getDefaultFormClass (string $action_name, [ $gateway = null])
 string getDefaultFormPath (string $action_name)
 string getDefaultForwardPath (string $forward_name)
 string getDefaultViewClass (string $forward_name, [ $gateway = null])
 string getDefaultViewPath (string $forward_name)
 string getDirectory (string $key)
 string getDSN ([string $db_key = ""])
 bool getDSN_persistent ([string $db_key = ""])
 string getErrorMessage (int $code)
 string getExt (string $key)
 void getGateway ()
 array getLanguage ()
 string getLocale ()
 string getManagerClassName (string $name)
 array getManagerList ()
 string getObjectClassName (string $name)
 string getTemplatedir ()
 string getTestdir ()
 string getURL ()
 object Ethna_View getView ()
 string getViewClassName (string $forward_name)
 string getViewdir ()
 void setCLI (bool $cli)
 void setClientEncoding (string $client_encoding)
 string setDirectory (string $key,  $value)
 void setGateway ( $gateway)
 void setLocale ($locale $locale)
 boolean setView ($view $view)
 mixed trigger ([mixed $default_action_name = ""], [mixed $fallback_action_name = ""], [bool $enable_filter = true])
 void _ethnaManagerEnabledCheck ( $action_name)
 array _getAction (string $action_name, [ $gateway = null])
 int _getDefaultGateway ( $gateway)
 string _getForwardPath (string $forward_name)
 string _getGatewayPrefix ([string $gateway = null])
 void _includeActionScript (array $action_obj, string $action_name)
 void _includeDirectory ( $dir)
 void _includeViewScript (array $forward_obj, string $forward_name)
 array _prepareDSN ()
 string _selectDSN (string $type, array $dsn_list)
 void _setLanguage (string $locale, [string $system_encoding = null], [string $client_encoding = null])
 string _sortForward (string $action_name, string $retval)
Variables
mixed $action = array() (line 129)
  • access: protected
mixed $action_cli = array() (line 132)
  • access: protected
mixed $action_form = null (line 150)
  • access: protected
mixed $action_name (line 111)
  • access: protected
mixed $action_xmlrpc = array() (line 135)
  • access: protected
string $appid = 'ETHNA' (line 29)
  • var: アプリケーションID
  • access: protected
string $base = '' (line 32)
  • var: アプリケーションベースディレクトリ
  • access: protected
mixed $class = array() (line 76)
  • access: public
mixed $class_default = array(
'class' => 'Ethna_ClassFactory',
'backend' => 'Ethna_Backend',
'config' => 'Ethna_Config',
'db' => 'Ethna_DB',
'error' => 'Ethna_ActionError',
'form' => 'Ethna_ActionForm',
'i18n' => 'Ethna_I18N',
'logger' => 'Ethna_Logger',
'plugin' => 'Ethna_Plugin',
'renderer' => 'Ethna_Renderer_Smarty',
'session' => 'Ethna_Session',
'sql' => 'Ethna_AppSQL',
'view' => 'Ethna_ViewClass',
'url_handler' => 'Ethna_UrlHandler',
)
(line 79)
  • access: public
mixed $class_factory = null (line 147)
  • access: protected
mixed $client_encoding (line 108)

ブラウザからのエンコーディングを指す

  • access: protected
mixed $config = null (line 156)
  • access: protected
mixed $db = array(
'' => DB_TYPE_RW,
)
(line 65)
  • access: protected
mixed $directory = array() (line 41)
  • access: protected
mixed $directory_default = array(
'action' => 'app/action',
'action_cli' => 'app/action_cli',
'action_xmlrpc' => 'app/action_xmlrpc',
'app' => 'app',
'plugin' => 'app/plugin',
'bin' => 'bin',
'etc' => 'etc',
'filter' => 'app/filter',
'locale' => 'locale',
'log' => 'log',
'plugins' => array(),'template'=>'template','template_c'=>'tmp','tmp'=>'tmp','view'=>'app/view','www'=>'www','test'=>'app/test',)
(line 44)
  • access: protected
mixed $dsn (line 38)
  • access: protected
mixed $ext = array(
'php' => 'php',
'tpl' => 'tpl',
)
(line 70)
  • access: protected
mixed $filter = array(
)
(line 97)
  • access: protected
mixed $filter_chain = array() (line 144)
  • access: protected
mixed $forward = array() (line 117)
  • access: protected
mixed $forward_default = array(
'403' => array( 'view_name' => 'Ethna_View_403',),'404'=>array('view_name'=>'Ethna_View_404',),'500'=>array('view_name'=>'Ethna_View_500',),'json'=>array('view_name'=>'Ethna_View_Json',),'redirect'=>array('view_name'=>'Ethna_View_Redirect',),)
(line 120)
  • access: protected
mixed $gateway = GATEWAY_WWW (line 165)
  • access: protected
mixed $locale (line 101)
  • access: protected
mixed $logger = null (line 159)
  • access: protected
mixed $manager = array() (line 138)
  • access: protected
mixed $plugin = null (line 162)
  • access: protected
mixed $renderer = null (line 141)
  • access: protected
mixed $system_encoding (line 104)
  • access: protected
mixed $url = '' (line 35)
  • access: protected
mixed $view = null (line 153)
  • access: protected
mixed $xmlrpc_method_name (line 114)
  • access: protected
Methods
static checkActionName (line 343)

アクション名をチェックする

  • return: true:OK Ethna_Error:NG
  • access: public
mixed checkActionName (string $action_name)
  • string $action_name: アクション名
static checkAppId (line 315)

アプリケーションIDをチェックする

  • return: true:OK Ethna_Error:NG
  • access: public
mixed checkAppId (string $id)
  • string $id: アプリケーションID
static checkViewName (line 361)

ビュー名をチェックする

  • return: true:OK Ethna_Error:NG
  • access: public
mixed checkViewName (string $view_name)
  • string $view_name: ビュー名
static getInstance (line 286)

(現在アクティブな)コントローラのインスタンスを返す

  • return: コントローラのインスタンス
  • access: public
object Ethna_Controller getInstance ()
static main (line 854)

アプリケーションのエントリポイント

  • access: public
void main (string $class_name, [mixed $action_name = ""], [mixed $fallback_action_name = ""])
  • string $class_name: アプリケーションコントローラのクラス名
  • mixed $action_name: 指定のアクション名(省略可)
  • mixed $fallback_action_name: アクションが決定できなかった場合に実行されるアクション名(省略可)
static main_CLI (line 870)

CLIアプリケーションのエントリポイント

  • access: public
void main_CLI (string $class_name, string $action_name, [bool $enable_filter = true])
  • string $class_name: アプリケーションコントローラのクラス名
  • string $action_name: 実行するアクション名
  • bool $enable_filter: フィルタチェインを有効にするかどうか
static main_SOAP (line 904)

SOAPアプリケーションのエントリポイント

  • access: public
void main_SOAP (string $class_name, [mixed $action_name = ""], [mixed $fallback_action_name = ""])
  • string $class_name: アプリケーションコントローラのクラス名
  • mixed $action_name: 指定のアクション名(省略可)
  • mixed $fallback_action_name: アクションが決定できなかった場合に実行されるアクション名(省略可)
static main_XMLRPC (line 884)

XMLRPCアプリケーションのエントリポイント

  • access: public
void main_XMLRPC ( $class_name)
  • $class_name
Constructor __construct (line 175)

Ethna_Controllerクラスのコンストラクタ

  • access: public
Ethna_Controller __construct ([ $gateway = GATEWAY_WWW])
  • $gateway
actionClassToName (line 1597)

getDefaultActionClass()で取得したクラス名からアクション名を取得する

getDefaultActionClass()をオーバーライドした場合、こちらも合わせてオーバーライド することを推奨(必須ではない)

  • return: アクション名
  • access: public
string actionClassToName (string $class_name)
  • string $class_name: アクションクラス名
actionFormToName (line 1520)

getDefaultFormClass()で取得したクラス名からアクション名を取得する

getDefaultFormClass()をオーバーライドした場合、こちらも合わせてオーバーライド することを推奨(必須ではない)

  • return: アクション名
  • access: public
string actionFormToName (string $class_name)
  • string $class_name: フォームクラス名
end (line 273)

アプリケーション実行後の後始末を行います。

  • access: protected
void end ()
ethnaManagerCheckErrorMsg (line 2220)

Ethnaマネージャが実行不能な場合のエラーメッセージを 表示する。運用上の都合でこのメッセージを出力したくない 場合は、このメソッドをオーバーライドせよ

  • access: protected
void ethnaManagerCheckErrorMsg ( $action_name)
  • $action_name
forwardPathToName (line 1737)

テンプレートパス名から遷移名を取得する

getDefaultForwardPath()をオーバーライドした場合、こちらも合わせてオーバーライド することを推奨(必須ではない)

  • return: 遷移名
  • access: public
string forwardPathToName (string $forward_path)
  • string $forward_path: テンプレートパス名
getActionClassName (line 1557)

指定されたアクションのクラス名を返す(オブジェクトの生成は行わない)

  • return: アクションのクラス名
  • access: public
string getActionClassName (string $action_name)
  • string $action_name: アクションの名称
getActiondir (line 475)

アクションディレクトリ名を決定する

  • return: アクションディレクトリ
  • access: public
string getActiondir ([ $gateway = null])
  • $gateway
getActionError (line 575)

アクションエラーオブジェクトのアクセサ

  • return: アクションエラーオブジェクト
  • access: public
object Ethna_ActionError getActionError ()
getActionForm (line 586)

Accessor for ActionForm

  • return: アクションフォームオブジェクト
  • access: public
object Ethna_ActionForm getActionForm ()
getActionFormName (line 1480)

指定されたアクションのフォームクラス名を返す(オブジェクトの生成は行わない)

  • return: アクションのフォームクラス名
  • access: public
string getActionFormName (string $action_name)
  • string $action_name: アクション名
getActionRequest (line 1343)

アクション名を指定するクエリ/HTMLを生成する

  • todo: consider gateway
  • access: public
void getActionRequest (string $action, [string $type = "hidden"])
  • string $action: action to request
  • string $type: hidden, url...
getAppId (line 302)

アプリケーションIDを返す

  • return: アプリケーションID
  • access: public
string getAppId ()
getBackend (line 644)

backendオブジェクトのアクセサ

  • return: backendオブジェクト
  • access: public
object Ethna_Backend getBackend ()
getBasedir (line 441)

アプリケーションベースディレクトリを返す

  • return: アプリケーションベースディレクトリ
  • access: public
string getBasedir ()
getClassFactory (line 564)

クラスファクトリオブジェクトのアクセサ(R)

  • return: クラスファクトリオブジェクト
  • access: public
object Ethna_ClassFactory getClassFactory ()
getCLI (line 2240)

CLI実行中フラグを取得する

  • return: CLI実行中フラグ
  • access: public
bool getCLI ()
getClientEncoding (line 807)

クライアントエンコーディング名へのアクセサ(R)

  • return: クライアントエンコーディング名
  • access: public
string getClientEncoding ()
getConfig (line 655)

設定オブジェクトのアクセサ

  • return: 設定オブジェクト
  • access: public
object Ethna_Config getConfig ()
getCurrentActionName (line 744)

実行中のアクション名を返す

  • return: 実行中のアクション名
  • access: public
string getCurrentActionName ()
getDBType (line 411)

DB設定を返す

  • access: public
string getDBType ([string $db_key = null])
  • string $db_key: DBキー("", "r", "rw", "default", "blog_r"...)
getDefaultActionClass (line 1576)

アクションに対応するアクションクラス名が省略された場合のデフォルトクラス名を返す

デフォルトでは[プロジェクトID]_Action_[アクション名]となるので好み応じてオーバライドする

  • return: アクションクラス名
  • access: public
string getDefaultActionClass (string $action_name, [ $gateway = null])
  • string $action_name: アクション名
  • $gateway
getDefaultActionPath (line 1620)

アクションに対応するアクションパス名が省略された場合のデフォルトパス名を返す

デフォルトでは"foo_bar" -> "/Foo/Bar.php"となるので好み応じてオーバーライドする

  • return: アクションクラスが定義されるスクリプトのパス名
  • access: public
string getDefaultActionPath (string $action_name)
  • string $action_name: アクション名
getDefaultFormClass (line 1499)

アクションに対応するフォームクラス名が省略された場合のデフォルトクラス名を返す

デフォルトでは[プロジェクトID]_Form_[アクション名]となるので好み応じてオーバライドする

  • return: アクションフォーム名
  • access: public
string getDefaultFormClass (string $action_name, [ $gateway = null])
  • string $action_name: アクション名
  • $gateway
getDefaultFormPath (line 1545)

アクションに対応するフォームパス名が省略された場合のデフォルトパス名を返す

デフォルトでは_getDefaultActionPath()と同じ結果を返す(1ファイルに アクションクラスとフォームクラスが記述される)ので、好みに応じて オーバーライドする

  • return: form classが定義されるスクリプトのパス名
  • access: public
string getDefaultFormPath (string $action_name)
  • string $action_name: アクション名
getDefaultForwardPath (line 1722)

遷移名に対応するテンプレートパス名が省略された場合のデフォルトパス名を返す

デフォルトでは"foo_bar"というforward名が"foo/bar" + テンプレート拡張子となる ので好み応じてオーバライドする

  • return: forwardパス名
  • access: public
string getDefaultForwardPath (string $forward_name)
  • string $forward_name: forward名
getDefaultViewClass (line 1684)

遷移名に対応するビュークラス名が省略された場合のデフォルトクラス名を返す

デフォルトでは[プロジェクトID]_View_[遷移名]となるので好み応じてオーバライドする

  • return: view classクラス名
  • access: public
string getDefaultViewClass (string $forward_name, [ $gateway = null])
  • string $forward_name: forward名
  • $gateway
getDefaultViewPath (line 1704)

遷移名に対応するビューパス名が省略された場合のデフォルトパス名を返す

デフォルトでは"foo_bar" -> "/Foo/Bar.php"となるので好み応じてオーバーライドする

  • return: view classが定義されるスクリプトのパス名
  • access: public
string getDefaultViewPath (string $forward_name)
  • string $forward_name: forward名
getDirectory (line 523)

アプリケーションディレクトリ設定を返す

  • access: public
string getDirectory (string $key)
  • string $key: ディレクトリタイプ("tmp", "template"...)
getDSN (line 378)

DSNを返す

  • return: DSN
  • access: public
string getDSN ([string $db_key = ""])
  • string $db_key: DBキー
getDSN_persistent (line 393)

DSNの持続接続設定を返す

  • return: true:persistent false:non-persistent(あるいは設定無し)
  • access: public
bool getDSN_persistent ([string $db_key = ""])
  • string $db_key: DBキー
getErrorMessage (line 1204)

エラーメッセージを取得する

  • return: エラーメッセージ
  • access: public
string getErrorMessage (int $code)
  • int $code: エラーコード
getExt (line 550)

アプリケーション拡張子設定を返す

  • access: public
string getExt (string $key)
  • string $key: 拡張子タイプ("php", "tpl"...)
getGateway (line 830)

ゲートウェイを取得する

  • access: public
void getGateway ()
getI18N (line 666)

i18nオブジェクトのアクセサ(R)

  • return: i18nオブジェクト
  • access: public
object Ethna_I18N getI18N ()
getLanguage (line 770)

ロケール設定、使用言語を取得する

array getLanguage ()
getLocale (line 782)

ロケール名へのアクセサ(R)

  • return: ロケール名(e.x ja_JP, en_US 等), (ロケール名は、ll_cc の形式。ll = 言語コード cc = 国コード)
  • access: public
string getLocale ()
getLogger (line 677)

ログオブジェクトのアクセサ

  • return: ログオブジェクト
  • access: public
object Ethna_Logger getLogger ()
getManagerClassName (line 1924)

マネージャクラス名を取得する

  • return: マネージャクラス名
  • access: public
string getManagerClassName (string $name)
  • string $name: マネージャキー
getManagerList (line 733)

マネージャ一覧を返す

  • return: マネージャ一覧
  • access: public
array getManagerList ()
getObjectClassName (line 1939)

アプリケーションオブジェクトクラス名を取得する

  • return: マネージャクラス名
  • access: public
string getObjectClassName (string $name)
  • string $name: アプリケーションオブジェクトキー
getPlugin (line 710)

プラグインオブジェクトのアクセサ

  • return: プラグインオブジェクト
  • access: public
object Ethna_Plugin getPlugin ()
getRenderer (line 1775)

レンダラを取得する

  • return: レンダラオブジェクト
  • access: public
object Ethna_Renderer getRenderer ()
getSession (line 688)

セッションオブジェクトのアクセサ

  • return: セッションオブジェクト
  • access: public
object Ethna_Session getSession ()
getSQL (line 699)

SQLオブジェクトのアクセサ

  • return: SQLオブジェクト
  • access: public
getTemplatedir (line 455)

クライアントタイプ/言語からテンプレートディレクトリ名を決定する デフォルトでは [appid]/template/ja_JP/ (ja_JPはロケール名) ロケール名は _getDefaultLanguage で決定される。

  • return: テンプレートディレクトリ
  • see: _getDefaultLanguage
  • access: public
string getTemplatedir ()
getTemplateEngine (line 1811)

テンプレートエンジン取得する (DEPRECATED) getRenderer() を使ってください

  • return: レンダラオブジェクト
  • access: public
object Ethna_Renderer getTemplateEngine ()
getTestdir (line 511)

(action,view以外の)テストケースを置くディレクトリ名を決定する

  • return: テストケースを置くディレクトリ
  • access: public
string getTestdir ()
getURL (line 430)

アプリケーションベースURLを返す

  • return: アプリケーションベースURL
  • access: public
string getURL ()
getUrlHandler (line 721)

URLハンドラオブジェクトのアクセサ

  • return: URLハンドラオブジェクト
  • access: public
object Ethna_UrlHandler getUrlHandler ()
getView (line 615)

Accessor for ViewClass

  • return: ビューオブジェクト
  • access: public
object Ethna_View getView ()
getViewClassName (line 1635)

指定された遷移名に対応するビュークラス名を返す(オブジェクトの生成は行わない)

  • return: view classのクラス名
  • access: public
string getViewClassName (string $forward_name)
  • string $forward_name: 遷移先の名称
getViewdir (line 500)

ビューディレクトリ名を決定する

  • return: ビューディレクトリ
  • access: public
string getViewdir ()
getXmlrpcMethodName (line 755)

実行中のXMLRPCメソッド名を返す

  • return: 実行中のXMLRPCメソッド名
  • access: public
string getXmlrpcMethodName ()
handleError (line 1189)

エラーハンドラ

エラー発生時の追加処理を行いたい場合はこのメソッドをオーバーライドする (アラートメール送信等−デフォルトではログ出力時にアラートメール が送信されるが、エラー発生時に別にアラートメールをここで送信 させることも可能)

  • access: public
void handleError (object Ethna_Error $error)
setActionForm (line 599)

Setter for ActionForm if the ::$action_form class is not null, then cannot set the view

  • return: アクションフォームオブジェクト
  • access: public
object Ethna_ActionForm setActionForm ( $af)
  • $af
setCLI (line 2252)

CLI実行中フラグを設定する

  • access: public
void setCLI (bool $cli)
  • bool $cli: CLI実行中フラグ
setClientEncoding (line 818)

クライアントエンコーディング名へのアクセサ(W)

  • access: public
void setClientEncoding (string $client_encoding)
  • string $client_encoding: クライアントエンコーディング名
setDirectory (line 537)

アプリケーションディレクトリ設定を返す

  • return: directory
  • access: public
string setDirectory (string $key,  $value)
  • string $key: type
  • $value
setGateway (line 840)

ゲートウェイモードを設定する

  • access: public
void setGateway ( $gateway)
  • $gateway
setLocale (line 794)

ロケール名へのアクセサ(W)

  • access: public
void setLocale ($locale $locale)
  • $locale $locale: ロケール名(e.x ja_JP, en_US 等), (ロケール名は、ll_cc の形式。ll = 言語コード cc = 国コード)
setView (line 629)

Setter for ViewClass if the ::$view class is not null, then cannot set the view

  • access: public
boolean setView ($view $view)
  • $view $view: object Ethna_ViewClass
trigger (line 920)

フレームワークの処理を開始する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed trigger ([mixed $default_action_name = ""], [mixed $fallback_action_name = ""], [bool $enable_filter = true])
  • mixed $default_action_name: 指定のアクション名
  • mixed $fallback_action_name: アクション名が決定できなかった場合に実行されるアクション名
  • bool $enable_filter: フィルタチェインを有効にするかどうか
_activateEthnaManager (line 2152)

Ethnaマネージャを設定する

不要な場合は空のメソッドとしてオーバーライドしてもよい

  • access: protected
void _activateEthnaManager ()
_createFilterChain (line 1438)

フィルタチェインを生成する

  • access: protected
void _createFilterChain ()
_ethnaManagerEnabledCheck (line 2203)

Ethnaマネージャが実行可能かをチェックする

Ethnaマネージャを実行するよう指示されているにも関わらず、 debug が trueでない場合は実行を停止する。

  • access: protected
void _ethnaManagerEnabledCheck ( $action_name)
  • $action_name
_getAction (line 1361)

フォームにより要求されたアクション名に対応する定義を返す

  • return: アクション定義
  • access: public
array _getAction (string $action_name, [ $gateway = null])
  • string $action_name: アクション名
  • $gateway
_getActionName_Form (line 1275)

フォームにより要求されたアクション名を返す

アプリケーションの性質に応じてこのメソッドをオーバーライドして下さい。 デフォルトでは"action_"で始まるフォーム値の"action_"の部分を除いたもの ("action_sample"なら"sample")がアクション名として扱われます

  • return: フォームにより要求されたアクション名
  • access: protected
string _getActionName_Form ()
_getDefaultGateway (line 1881)

デフォルト状態でのゲートウェイを取得する

  • return: ゲートウェイ定義(GATEWAY_WWW, GATEWAY_CLI...)
  • access: protected
int _getDefaultGateway ( $gateway)
  • $gateway
_getDefaultLanguage (line 1870)

デフォルト状態での使用言語を取得する 外部に出力されるEthnaのエラーメッセージ等のエンコーディングを 切り替えたい場合は、このメソッドをオーバーライドする。

  • return:

    ロケール名(e.x ja_JP, en_US 等), システムエンコーディング名, クライアントエンコーディング名 (= テンプレートのエンコーディングと考えてよい) の配列 (ロケール名は ll_cc の形式。ll = 言語コード cc = 国コード)

    WARNING!! : クライアントエンコーディング名が、フレームワークの内部エンコーデ ィングとして設定されます。つまり、クライアントエンコーディングで ブラウザからの入力は入ってくるものと想定しています!

  • access: protected
array _getDefaultLanguage ()
_getForwardPath (line 1752)

遷移名からテンプレートファイルのパス名を取得する

  • return: テンプレートファイルのパス名
  • access: public
string _getForwardPath (string $forward_name)
  • string $forward_name: forward名
_getGatewayPrefix (line 1896)

ゲートウェイに対応したクラス名のプレフィクスを取得する

  • return: ゲートウェイクラスプレフィクス
  • access: protected
string _getGatewayPrefix ([string $gateway = null])
  • string $gateway: ゲートウェイ
_includeActionScript (line 1959)

アクションスクリプトをインクルードする

ただし、インクルードしたファイルにクラスが正しく定義されているかどうかは保証しない

  • access: protected
void _includeActionScript (array $action_obj, string $action_name)
  • array $action_obj: アクション定義
  • string $action_name: アクション名
_includeDirectory (line 2070)

ディレクトリ以下の全てのスクリプトをインクルードする

  • access: protected
void _includeDirectory ( $dir)
  • $dir
_includeViewScript (line 2034)

ビュースクリプトをインクルードする

ただし、インクルードしたファイルにクラスが正しく定義されているかどうかは保証しない

  • access: protected
void _includeViewScript (array $forward_obj, string $forward_name)
  • array $forward_obj: 遷移定義
  • string $forward_name: 遷移名
_prepareDSN (line 2102)

設定ファイルのDSN定義から使用するデータを再構築する(スレーブアクセス分岐等)

DSNの定義方法(デフォルト:設定ファイル)を変えたい場合はここをオーバーライドする

  • return: DSN定義(array('DBキー1' => 'dsn1', 'DBキー2' => 'dsn2', ...))
  • access: protected
array _prepareDSN ()
_selectDSN (line 2131)

DSNのアクセス分岐を行う

スレーブサーバへの振分け処理(デフォルト:ランダム)を変更したい場合はこのメソッドをオーバーライドする

  • return: 選択されたDSN
  • access: protected
string _selectDSN (string $type, array $dsn_list)
  • string $type: DB種別
  • array $dsn_list: DSN一覧
_setDefaultTemplateEngine (line 1824)

テンプレートエンジンのデフォルト状態を設定する

  • access: protected
void _setDefaultTemplateEngine (object Ethna_Renderer $renderer)
_setLanguage (line 1841)

使用言語、ロケールを設定する 条件によって使用言語、ロケールを切り替えたい場合は、 このメソッドをオーバーライドする。

void _setLanguage (string $locale, [string $system_encoding = null], [string $client_encoding = null])
  • string $locale: ロケール名(ja_JP, en_US等) (ll_cc の形式。ll = 言語コード cc = 国コード)
  • string $system_encoding: システムエンコーディング名
  • string $client_encoding: クライアントエンコーディング(テンプレートのエンコーディングと考えれば良い)
_sortForward (line 1428)

アクション名とアクションクラスからの戻り値に基づいて遷移先を決定する

  • return: 遷移先
  • access: protected
string _sortForward (string $action_name, string $retval)
  • string $action_name: アクション名
  • string $retval: アクションクラスからの戻り値

Documentation generated on Fri, 11 Nov 2011 03:57:54 +0900 by phpDocumentor 1.4.3