import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -17,14 +17,9 @@
|
||||
* @subpackage Zend_InfoCard_Xml_Security
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Transform.php 9094 2008-03-30 18:36:55Z thomas $
|
||||
* @version $Id: Transform.php 15577 2009-05-14 12:43:34Z matthew $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Zend_Loader
|
||||
*/
|
||||
require_once 'Zend/Loader.php';
|
||||
|
||||
/**
|
||||
* A class to create a transform rule set based on XML URIs and then apply those rules
|
||||
* in the correct order to a given XML input
|
||||
@ -59,6 +54,7 @@ class Zend_InfoCard_Xml_Security_Transform
|
||||
case 'http://www.w3.org/2001/10/xml-exc-c14n#':
|
||||
return 'Zend_InfoCard_Xml_Security_Transform_XmlExcC14N';
|
||||
default:
|
||||
require_once 'Zend/InfoCard/Xml/Security/Exception.php';
|
||||
throw new Zend_InfoCard_Xml_Security_Exception("Unknown or Unsupported Transformation Requested");
|
||||
}
|
||||
}
|
||||
@ -97,13 +93,17 @@ class Zend_InfoCard_Xml_Security_Transform
|
||||
public function applyTransforms($strXmlDocument)
|
||||
{
|
||||
foreach($this->_transformList as $transform) {
|
||||
Zend_Loader::loadClass($transform['class']);
|
||||
if (!class_exists($transform['class'])) {
|
||||
require_once 'Zend/Loader.php';
|
||||
Zend_Loader::loadClass($transform['class']);
|
||||
}
|
||||
|
||||
$transformer = new $transform['class'];
|
||||
|
||||
// We can't really test this check because it would require logic changes in the component itself
|
||||
// @codeCoverageIgnoreStart
|
||||
if(!($transformer instanceof Zend_InfoCard_Xml_Security_Transform_Interface)) {
|
||||
require_once 'Zend/InfoCard/Xml/Security/Exception.php';
|
||||
throw new Zend_InfoCard_Xml_Security_Exception("Transforms must implement the Transform Interface");
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
Reference in New Issue
Block a user