$cfg->setConfigEntry('mailer_class', 'DebugMailer');
// CFG: XML-PARSER-CLASS
-$cfg->setConfigEntry('xml_parser_class', 'XmlParser');
+$cfg->setConfigEntry('xml_parser_class', 'CoreFramework\Parser\Xml\XmlParser');
// CFG: DECO-COMPACTING-XML-PARSER-CLASS
$cfg->setConfigEntry('deco_compacting_xml_parser_class', 'XmlCompactorDecorator');
ksort($this->config);
}
+ /**
+ * Getter for whole configuration array
+ *
+ * @return $config Configuration array
+ */
+ public final function getConfigurationArray () {
+ // Return it
+ return $this->config;
+ }
+
/**
* Unset a configuration key, the entry must be there or else an
* exception is thrown.
use CoreFramework\Manager\ManageableApplication;
use CoreFramework\Middleware\Compressor\CompressorChannel;
use CoreFramework\Middleware\Debug\DebugMiddleware;
+use CoreFramework\Parser\Parseable;
use CoreFramework\Registry\Register;
use CoreFramework\Registry\Registry;
use CoreFramework\Request\Requestable;
// Import framework stuff
use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Parser\Parseable;
/**
* A XML compacting decorator class for XML parsers
namespace CoreFramework\Parser\Xml;
// Import framework stuff
+use CoreFramework\Parser\BaseParser;
+use CoreFramework\Parser\Parseable;
use CoreFramework\Template\CompileableTemplate;
/**
// Import framework stuff
use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Parser\Xml\XmlParser;
use CoreFramework\Registry\Registry;
use CoreFramework\Response\Responseable;
use CoreFramework\Template\CompileableTemplate;
namespace CoreFramework\Template\Engine;
// Import framework stuff
+use CoreFramework\Parser\Xml\XmlParser;
use CoreFramework\Registry\Registry;
use CoreFramework\Response\Responseable;
use CoreFramework\Template\CompileableTemplate;
// Import framework stuff
use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Parser\Xml\XmlParser;
use CoreFramework\Registry\Registry;
use CoreFramework\Template\CompileableTemplate;
use CoreFramework\Response\Responseable;
use CoreFramework\Tests\Filter\BaseTestsFilter;
+// Import SPL stuff
+use \InvalidArgumentException;
+
/**
* A LoadableClasses filter for tests
*
* @todo 0% done
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Loop through all configuration keys
+ foreach ($this->getConfigInstance()->getConfigurationArray() as $configKey => $configValue) {
+ // Key must end with _class
+ if (substr($configKey, -6, 6) != '_class') {
+ // Skip this
+ continue;
+ } // END - if
+
+ // Output message
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Testing configKey=%s,configValue[%s]=%s', $configKey, gettype($configValue), $configValue));
+
+ // This may throw exceptions
+ try {
+ // Is the class there?
+ if (!class_exists($configValue)) {
+ // Class not found
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Class "%s" not found. FAILED', $configValue));
+
+ // Skip further tests
+ continue;
+ } // END - if
+ } catch (InvalidArgumentException $e) {
+ // Maybe not conform?
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Class "%s" failed to load. Message: "%s"', $configValue, $e->getMessage()));
+
+ // Skip further tests
+ continue;
+ }
+
+ // class_exists() didn't fail
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Class "%s" loaded successfully. OKAY', $configValue));
+ } // END - foreach
+
// Implement this!
$this->partialStub('Please implement this method.');
}