[ Index ]

PHP Cross Reference of Akelos Framework

title

Body

[close]

/ -> AkActionWebService.php (source)

   1  <?php
   2  /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
   3  
   4  // +----------------------------------------------------------------------+
   5  // | Akelos Framework - http://www.akelos.org                             |
   6  // +----------------------------------------------------------------------+
   7  // | Copyright (c) 2002-2006, Akelos Media, S.L.  & Bermi Ferrer Martinez |
   8  // | Released under the GNU Lesser General Public License, see LICENSE.txt|
   9  // +----------------------------------------------------------------------+
  10  
  11  /**
  12   * @package ActionWebservice
  13   * @subpackage Base
  14   * @author Bermi Ferrer <bermi a.t akelos c.om>
  15   * @copyright Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org
  16   * @license GNU Lesser General Public License <http://www.gnu.org/copyleft/lesser.html>
  17   */
  18  
  19  class AkActionWebService extends AkObject
  20  {
  21      var $_apis = array();
  22      
  23      function __construct()
  24      {
  25          $this->_linkWebServiceApis();
  26      }
  27  
  28      function _linkWebServiceApis()
  29      {
  30          if(!empty($this->web_service_api)){
  31              $this->web_service_api = Ak::toArray($this->web_service_api);
  32              foreach ($this->web_service_api as $api){
  33                  $this->_linkWebServiceApi($api);
  34              }
  35          }
  36      }
  37      
  38      function _linkWebServiceApi($api)
  39      {
  40          $api_path = AkInflector::underscore($api);
  41          if(substr($api_path,-4) != '_api'){
  42              $api_name_space = $api_path;
  43              $api_path = $api_path.'_api';
  44          }else{
  45              $api_name_space = substr($api_path,0,-4);
  46          }
  47          $api_class_name = AkInflector::camelize($api_path);
  48          
  49          require_once (AK_LIB_DIR.DS.'AkActionWebService'.DS.'AkActionWebServiceApi.php');
  50          require_once(AK_APIS_DIR.DS.$api_path.'.php');
  51          
  52          $this->_apis[$api_name_space] =& new $api_class_name;
  53      }
  54      
  55      function &getApis()
  56      {
  57          return $this->_apis;
  58      }
  59  }
  60  
  61  
  62  ?>


Generated: Mon Oct 27 12:43:49 2008 Cross-referenced by PHPXref 0.6