Mage_Api_Model_Wsdl_Config Class Reference

Inheritance diagram for Mage_Api_Model_Wsdl_Config:

Mage_Api_Model_Wsdl_Config_Base Varien_Simplexml_Config

List of all members.

Public Member Functions

 __construct ($sourceData=null)
 getWsdlContent ()
 getCache ()
 init ()
 getXmlString ()

Static Public Member Functions

static getNamespacesPrefix ()

Protected Member Functions

 _loadCache ($id)
 _saveCache ($data, $id, $tags=array(), $lifetime=false)
 _removeCache ($id)

Static Protected Attributes

static $_namespacesPrefix = null


Detailed Description

Definition at line 34 of file Config.php.


Constructor & Destructor Documentation

__construct ( sourceData = null  ) 

Constructor

Initializes XML for this configuration

See also:
self.setXml
Parameters:
string|Varien_Simplexml_Element $sourceData
string $sourceType

Reimplemented from Mage_Api_Model_Wsdl_Config_Base.

Definition at line 38 of file Config.php.

00039     {
00040         $this->setCacheId('wsdl_config_global');
00041         parent::__construct($sourceData);
00042     }


Member Function Documentation

_loadCache ( id  )  [protected]

Enter description here...

Parameters:
string $id
Returns:
boolean

Reimplemented from Varien_Simplexml_Config.

Definition at line 76 of file Config.php.

00077     {
00078         return Mage::app()->loadCache($id);
00079     }

_removeCache ( id  )  [protected]

Enter description here...

Todo:
check this, as there are no caches that implement remove() method
Parameters:
string $id
Returns:
unknown

Reimplemented from Varien_Simplexml_Config.

Definition at line 86 of file Config.php.

00087     {
00088         return Mage::app()->removeCache($id);
00089     }

_saveCache ( data,
id,
tags = array(),
lifetime = false 
) [protected]

Enter description here...

Parameters:
string $data
string $id
array $tags
int|boolean $lifetime
Returns:
boolean

Reimplemented from Varien_Simplexml_Config.

Definition at line 81 of file Config.php.

00082     {
00083         return Mage::app()->saveCache($data, $id, $tags, $lifetime);
00084     }

getCache (  ) 

Enter description here...

Returns:
Varien_Simplexml_Config_Cache_Abstract

Reimplemented from Varien_Simplexml_Config.

Definition at line 71 of file Config.php.

00072     {
00073         return Mage::app()->getCache();
00074     }

static getNamespacesPrefix (  )  [static]

Return namespaces with their prefix

Returns:
array

Definition at line 59 of file Config.php.

00060     {
00061         if (is_null(self::$_namespacesPrefix)) {
00062             self::$_namespacesPrefix = array();
00063             $config = Mage::getSingleton('api/config')->getNode('v2/wsdl/prefix')->children();
00064             foreach ($config as $prefix => $namespace) {
00065                 self::$_namespacesPrefix[$namespace->asArray()] = $prefix;
00066             }
00067         }
00068         return self::$_namespacesPrefix;
00069     }

getWsdlContent (  ) 

Return wsdl content

Returns:
string

Definition at line 49 of file Config.php.

00050     {
00051         return $this->_xml->asXML();
00052     }

getXmlString (  ) 

Return Xml of node as string

Returns:
string

Reimplemented from Varien_Simplexml_Config.

Definition at line 128 of file Config.php.

00129     {
00130         return $this->getNode()->asXML();
00131     }

init (  ) 

Exclude Mage_Api wsdl xml file because it used for previous version of API wsdl declaration

Definition at line 91 of file Config.php.

00092     {
00093         $this->setCacheChecksum(null);
00094         $saveCache = true;
00095 
00096         if (Mage::app()->useCache('config')) {
00097             $loaded = $this->loadCache();
00098             if ($loaded) {
00099                 return $this;
00100             }
00101         }
00102 
00103         $mergeWsdl = new Mage_Api_Model_Wsdl_Config_Base();
00104         $mergeWsdl->setHandler($this->getHandler());
00105 
00106         /**
00107          * Exclude Mage_Api wsdl xml file because it used for previous version
00108          * of API wsdl declaration
00109          */
00110         $mergeWsdl->addLoadedFile(Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsdl.xml');
00111 
00112         $baseWsdlFile = Mage::getConfig()->getModuleDir('etc', "Mage_Api").DS.'wsdl2.xml';
00113         $this->loadFile($baseWsdlFile);
00114         Mage::getConfig()->loadModulesConfiguration('wsdl.xml', $this, $mergeWsdl);
00115 
00116         if (Mage::app()->useCache('config')) {
00117             $this->saveCache(array('config'));
00118         }
00119 
00120         return $this;
00121     }


Member Data Documentation

$_namespacesPrefix = null [static, protected]

Definition at line 36 of file Config.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:33 2009 for Magento by  doxygen 1.5.8