Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Api_Controller_Action
  • Mage_Api_Helper_Data
  • Mage_Api_IndexController
  • Mage_Api_Model_Acl
  • Mage_Api_Model_Acl_Assert_Ip
  • Mage_Api_Model_Acl_Assert_Time
  • Mage_Api_Model_Acl_Resource
  • Mage_Api_Model_Acl_Role
  • Mage_Api_Model_Acl_Role_Generic
  • Mage_Api_Model_Acl_Role_Group
  • Mage_Api_Model_Acl_Role_Registry
  • Mage_Api_Model_Acl_Role_User
  • Mage_Api_Model_Config
  • Mage_Api_Model_Mysql4_Acl
  • Mage_Api_Model_Mysql4_Acl_Role
  • Mage_Api_Model_Mysql4_Acl_Role_Collection
  • Mage_Api_Model_Mysql4_Permissions_Collection
  • Mage_Api_Model_Mysql4_Role
  • Mage_Api_Model_Mysql4_Role_Collection
  • Mage_Api_Model_Mysql4_Roles
  • Mage_Api_Model_Mysql4_Roles_Collection
  • Mage_Api_Model_Mysql4_Roles_User_Collection
  • Mage_Api_Model_Mysql4_Rules
  • Mage_Api_Model_Mysql4_Rules_Collection
  • Mage_Api_Model_Mysql4_User
  • Mage_Api_Model_Mysql4_User_Collection
  • Mage_Api_Model_Resource_Abstract
  • Mage_Api_Model_Resource_Acl
  • Mage_Api_Model_Resource_Acl_Role
  • Mage_Api_Model_Resource_Acl_Role_Collection
  • Mage_Api_Model_Resource_Permissions_Collection
  • Mage_Api_Model_Resource_Role
  • Mage_Api_Model_Resource_Role_Collection
  • Mage_Api_Model_Resource_Roles
  • Mage_Api_Model_Resource_Roles_Collection
  • Mage_Api_Model_Resource_Roles_User_Collection
  • Mage_Api_Model_Resource_Rules
  • Mage_Api_Model_Resource_Rules_Collection
  • Mage_Api_Model_Resource_User
  • Mage_Api_Model_Resource_User_Collection
  • Mage_Api_Model_Role
  • Mage_Api_Model_Roles
  • Mage_Api_Model_Rules
  • Mage_Api_Model_Server
  • Mage_Api_Model_Server_Adapter_Soap
  • Mage_Api_Model_Server_Adapter_Xmlrpc
  • Mage_Api_Model_Server_Handler
  • Mage_Api_Model_Server_Handler_Abstract
  • Mage_Api_Model_Server_V2_Adapter_Soap
  • Mage_Api_Model_Server_V2_Handler
  • Mage_Api_Model_Server_WSI_Adapter_Soap
  • Mage_Api_Model_Server_WSI_Handler
  • Mage_Api_Model_Session
  • Mage_Api_Model_User
  • Mage_Api_Model_Wsdl_Config
  • Mage_Api_Model_Wsdl_Config_Base
  • Mage_Api_SoapController
  • Mage_Api_V2_SoapController
  • Mage_Api_XmlrpcController

Interfaces

  • Mage_Api_Model_Server_Adapter_Interface

Exceptions

  • Mage_Api_Exception
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  8:  * that is bundled with this package in the file LICENSE.txt.
  9:  * It is also available through the world-wide-web at this URL:
 10:  * http://opensource.org/licenses/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_Api
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: /**
 28:  * Wsdl config model
 29:  *
 30:  * @category   Mage
 31:  * @package    Mage_Api
 32:  * @author     Magento Core Team <core@magentocommerce.com>
 33:  */
 34: class Mage_Api_Model_Wsdl_Config extends Mage_Api_Model_Wsdl_Config_Base
 35: {
 36:     protected static $_namespacesPrefix = null;
 37: 
 38:     public function __construct($sourceData=null)
 39:     {
 40:         $this->setCacheId('wsdl_config_global');
 41:         parent::__construct($sourceData);
 42:     }
 43: 
 44:     /**
 45:      * Return wsdl content
 46:      *
 47:      * @return string
 48:      */
 49:     public function getWsdlContent()
 50:     {
 51:         return $this->_xml->asXML();
 52:     }
 53: 
 54:     /**
 55:      * Return namespaces with their prefix
 56:      *
 57:      * @return array
 58:      */
 59:     public static function getNamespacesPrefix()
 60:     {
 61:         if (is_null(self::$_namespacesPrefix)) {
 62:             self::$_namespacesPrefix = array();
 63:             $config = Mage::getSingleton('api/config')->getNode('v2/wsdl/prefix')->children();
 64:             foreach ($config as $prefix => $namespace) {
 65:                 self::$_namespacesPrefix[$namespace->asArray()] = $prefix;
 66:             }
 67:         }
 68:         return self::$_namespacesPrefix;
 69:     }
 70: 
 71:     public function getCache()
 72:     {
 73:         return Mage::app()->getCache();
 74:     }
 75: 
 76:     protected function _loadCache($id)
 77:     {
 78:         return Mage::app()->loadCache($id);
 79:     }
 80: 
 81:     protected function _saveCache($data, $id, $tags=array(), $lifetime=false)
 82:     {
 83:         return Mage::app()->saveCache($data, $id, $tags, $lifetime);
 84:     }
 85: 
 86:     protected function _removeCache($id)
 87:     {
 88:         return Mage::app()->removeCache($id);
 89:     }
 90: 
 91:     public function init()
 92:     {
 93:         $this->setCacheChecksum(null);
 94:         $saveCache = true;
 95: 
 96:         if (Mage::app()->useCache('config')) {
 97:             $loaded = $this->loadCache();
 98:             if ($loaded) {
 99:                 return $this;
100:             }
101:         }
102: 
103:         $mergeWsdl = new Mage_Api_Model_Wsdl_Config_Base();
104:         $mergeWsdl->setHandler($this->getHandler());
105: 
106:         if(Mage::helper('api/data')->isComplianceWSI()){
107:         /**
108:          * Exclude Mage_Api wsdl xml file because it used for previous version
109:          * of API wsdl declaration
110:          */
111:             $mergeWsdl->addLoadedFile(Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsi.xml');
112: 
113:             $baseWsdlFile = Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsi.xml';
114:             $this->loadFile($baseWsdlFile);
115:             Mage::getConfig()->loadModulesConfiguration('wsi.xml', $this, $mergeWsdl);
116:         } else {
117:             /**
118:              * Exclude Mage_Api wsdl xml file because it used for previous version
119:              * of API wsdl declaration
120:              */
121:             $mergeWsdl->addLoadedFile(Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsdl.xml');
122: 
123:             $baseWsdlFile = Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsdl2.xml';
124:             $this->loadFile($baseWsdlFile);
125:             Mage::getConfig()->loadModulesConfiguration('wsdl.xml', $this, $mergeWsdl);
126:         }
127: 
128:         if (Mage::app()->useCache('config')) {
129:             $this->saveCache(array('config'));
130:         }
131: 
132:         return $this;
133:     }
134: 
135:     /**
136:      * Return Xml of node as string
137:      *
138:      * @return string
139:      */
140:     public function getXmlString()
141:     {
142:         return $this->getNode()->asXML();
143:     }
144: }
145: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0