2
0
Quellcode durchsuchen

ZF-9504: performance patch for XML-RPC

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22024 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew vor 15 Jahren
Ursprung
Commit
518b7a3f1e

+ 2 - 3
library/Zend/XmlRpc/Value.php

@@ -158,6 +158,7 @@ abstract class Zend_XmlRpc_Value
     {
         if (!$this->_xml) {
             $this->generateXml();
+            $this->_xml = (string) $this->getGenerator();
         }
         return $this->_xml;
     }
@@ -169,9 +170,7 @@ abstract class Zend_XmlRpc_Value
      */
     public function generateXml()
     {
-        if (!$this->_xml) {
-            $this->_generateXml();
-        }
+        $this->_generateXml();
     }
 
     /**

+ 0 - 2
library/Zend/XmlRpc/Value/Array.php

@@ -68,8 +68,6 @@ class Zend_XmlRpc_Value_Array extends Zend_XmlRpc_Value_Collection
         $generator->closeElement('data')
                   ->closeElement('array')
                   ->closeElement('value');
-
-        $this->_xml = (string)$generator;
     }
 }
 

+ 0 - 2
library/Zend/XmlRpc/Value/Scalar.php

@@ -49,7 +49,5 @@ abstract class Zend_XmlRpc_Value_Scalar extends Zend_XmlRpc_Value
                   ->openElement($this->_type, $this->_value)
                   ->closeElement($this->_type)
                   ->closeElement('value');
-
-        $this->_xml = (string)$generator;
     }
 }

+ 0 - 1
library/Zend/XmlRpc/Value/Struct.php

@@ -71,6 +71,5 @@ class Zend_XmlRpc_Value_Struct extends Zend_XmlRpc_Value_Collection
         }
         $generator->closeElement('struct')
                   ->closeElement('value');
-        $this->_xml = (string)$generator;
     }
 }