Source for file Gateway.php

Documentation is available at Gateway.php

  1. <?php
  2. // vim: foldmethod=marker
  3. /**
  4.  *  Gateway.php
  5.  *
  6.  *  @author     Masaki Fujimoto <fujimoto@php.net>
  7.  *  @license    http://www.opensource.org/licenses/bsd-license.php The BSD License
  8.  *  @package    Ethna
  9.  *  @version    $Id: e3270f14c9e8b1e36f6c91f3c237bf09d0b68a6c $
  10.  */
  11.  
  12. // {{{ Ethna_SOAP_Gateway
  13. /**
  14.  *  SOAPゲートウェイの基底クラス
  15.  *
  16.  *  @author     Masaki Fujimoto <fujimoto@php.net>
  17.  *  @access     public
  18.  *  @package    Ethna
  19.  */
  20. {
  21.     /**#@+
  22.      *  @access private
  23.      */
  24.  
  25.     /** @var    object  Ethna_Controller    controllerオブジェクト */
  26.     var $controller;
  27.  
  28.     /**#@-*/
  29.  
  30.     /**
  31.      *  Ethna_SOAP_Gatewayクラスのコンストラクタ
  32.      *
  33.      *  @access public
  34.      */
  35.     public function __construct()
  36.     {
  37.         $this->controller Ethna_Controller::getInstance();
  38.     }
  39.  
  40.     /**
  41.      *  SOAPアクションを実行する
  42.      *
  43.      *  @access public
  44.      */
  45.     function dispatch()
  46.     {
  47.         $this->controller->trigger();
  48.     }
  49.  
  50.     /**
  51.      *  アプリケーション設定値一覧を取得する
  52.      *
  53.      *  @access public
  54.      *  @return array   アプリケーション設定値一覧
  55.      */
  56.     function &getApp()
  57.     {
  58.         $action_form $this->controller->getActionForm();
  59.         return $action_form->app_vars;
  60.     }
  61.  
  62.     /**
  63.      *  エラーコードを取得する
  64.      *
  65.      *  @access public
  66.      *  @return int     エラーコード(nullならエラー無し)
  67.      */
  68.     function getErrorCode()
  69.     {
  70.         $action_error $this->controller->getActionError();
  71.         if ($action_error->count(== 0{
  72.             return null;
  73.         }
  74.         
  75.         // 最初の1つを返す
  76.         $error_list $action_error->getErrorList();
  77.         $error $error_list[0];
  78.  
  79.         return $error->getCode();
  80.     }
  81.  
  82.     /**
  83.      *  エラーメッセージを取得する
  84.      *
  85.      *  @access public
  86.      *  @return string  エラーメッセージ(nullならエラー無し)
  87.      */
  88.     function getErrorMessage()
  89.     {
  90.         $action_error $this->controller->getActionError();
  91.         if ($action_error->count(== 0{
  92.             return null;
  93.         }
  94.  
  95.         // 最初の1つを返す
  96.         $message_list $action_error->getMessageList();
  97.         $message $message_list[0];
  98.  
  99.         return $message;
  100.     }
  101. }
  102. // }}}

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