Class Ethna_ActionError

Description

アプリケーションエラー管理クラス

  • author: Masaki Fujimoto <fujimoto@php.net>
  • todo: 配列フォームを扱えるようにする
  • access: public

Located in /class/Ethna_ActionError.php (line 21)


	
			
Method Summary
 Ethna_ActionError Ethna_ActionError ()
 Ethna_Error &add (string $name, string $message, [int $code = null])
 void addObject (string $name,  &$error, object Ethna_Error $error)
 void clear ()
 int count ()
 array getErrorList ()
 string getMessage (string $name)
 array getMessageList ()
 bool isError (string $name)
 int length ()
Methods
Constructor Ethna_ActionError (line 42)

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

  • access: public
Ethna_ActionError Ethna_ActionError ()
add (line 55)

エラーオブジェクトを生成/追加する

  • return: エラーオブジェクト
  • access: public
Ethna_Error &add (string $name, string $message, [int $code = null])
  • string $name: エラーの発生したフォーム項目名(不要ならnull)
  • string $message: エラーメッセージ
  • int $code: エラーコード
addObject (line 74)

Ethna_Errorオブジェクトを追加する

  • access: public
void addObject (string $name,  &$error, object Ethna_Error $error)
  • string $name: エラーに対応するフォーム項目名(不要ならnull)
  • object Ethna_Error $error: エラーオブジェクト
  • &$error
clear (line 114)

登録されたエラーオブジェクトを全て削除する

  • access: public
void clear ()
count (line 93)

エラーオブジェクトの数を返す

  • return: エラーオブジェクトの数
  • access: public
int count ()
getErrorList (line 159)

エラーオブジェクトを配列にして返す

  • return: エラーオブジェクトの配列
  • access: public
array getErrorList ()
getMessage (line 143)

指定されたフォーム項目に対応するエラーメッセージを返す

  • return: エラーメッセージ(エラーが無い場合はnull)
  • access: public
string getMessage (string $name)
  • string $name: フォーム項目名
getMessageList (line 170)

エラーメッセージを配列にして返す

  • return: エラーメッセージの配列
  • access: public
array getMessageList ()
isError (line 126)

指定されたフォーム項目にエラーが発生しているかどうかを返す

  • return: true:エラーが発生している false:エラーが発生していない
  • access: public
bool isError (string $name)
  • string $name: フォーム項目名
length (line 104)

エラーオブジェクトの数を返す(count()メソッドのエイリアス)

  • return: エラーオブジェクトの数
  • access: public
int length ()

Documentation generated on Fri, 11 Nov 2011 03:58:59 +0900 by phpDocumentor 1.4.3