Changeset 2468

Show
Ignore:
Timestamp:
05/05/08 15:47:16 (8 months ago)
Author:
david
Message:

initial work on native xml configuration system, refs #519

Location:
branches/david-xml_only_config_system/src/config
Files:
14 added
7 modified

Legend:

Unmodified
Added
Removed
  • branches/david-xml_only_config_system/src/config/AgaviConfigCache.class.php

    r2259 r2468  
    101101      // a new-style config handler 
    102102      // it does not parse the config itself; instead, it is given an array of parsed DOM documents (with parents!) 
    103       $parser = new AgaviXmlConfigParser(); 
    104       $docs = $parser->parseAll($config, $handlerInfo['validation']); 
     103      $doc = AgaviXmlConfigParser::execute($config, $handlerInfo['validation'], AgaviConfig::get('core.environment'), $context); 
    105104 
    106105      if($context !== null) { 
     
    111110 
    112111      try { 
    113         $data = $handler->execute($docs); 
     112        $data = $handler->execute($doc); 
    114113      } catch(AgaviException $e) { 
    115114        throw new $e(sprintf("Compliation of configuration file '%s' failed for the following reason(s):\n\n%s", $config, $e->getMessage())); 
     
    272271  private static function loadConfigHandlers() 
    273272  { 
     273    $agaviDir = AgaviConfig::get('core.agavi_dir'); 
    274274    // since we only need the parser and handlers when the config is not cached 
    275275    // it is sufficient to include them at this stage 
    276     require_once(AgaviConfig::get('core.agavi_dir') . '/config/AgaviILegacyConfigHandler.interface.php'); 
    277     require(AgaviConfig::get('core.agavi_dir') . '/config/AgaviIXmlConfigHandler.interface.php'); 
    278     require_once(AgaviConfig::get('core.agavi_dir') . '/config/AgaviBaseConfigHandler.class.php'); 
    279     require_once(AgaviConfig::get('core.agavi_dir') . '/config/AgaviConfigHandler.class.php'); 
    280     require(AgaviConfig::get('core.agavi_dir') . '/config/AgaviXmlConfigHandler.class.php'); 
    281     require(AgaviConfig::get('core.agavi_dir') . '/config/AgaviAutoloadConfigHandler.class.php'); 
    282     require(AgaviConfig::get('core.agavi_dir') . '/config/AgaviConfigHandlersConfigHandler.class.php'); 
    283     require(AgaviConfig::get('core.agavi_dir') . '/config/AgaviConfigValueHolder.class.php'); 
    284     require(AgaviConfig::get('core.agavi_dir') . '/config/AgaviConfigParser.class.php'); 
    285     require(AgaviConfig::get('core.agavi_dir') . '/config/AgaviXmlConfigParser.class.php'); 
     276    require_once($agaviDir . '/config/AgaviILegacyConfigHandler.interface.php'); 
     277    require($agaviDir . '/config/AgaviIXmlConfigHandler.interface.php'); 
     278    require_once($agaviDir . '/config/AgaviBaseConfigHandler.class.php'); 
     279    require_once($agaviDir . '/config/AgaviConfigHandler.class.php'); 
     280    require($agaviDir . '/config/AgaviXmlConfigHandler.class.php'); 
     281    require($agaviDir . '/config/AgaviAutoloadConfigHandler.class.php'); 
     282    require($agaviDir . '/config/AgaviConfigHandlersConfigHandler.class.php'); 
     283    require($agaviDir . '/config/AgaviConfigValueHolder.class.php'); 
     284    require($agaviDir . '/config/AgaviConfigParser.class.php'); 
     285    require($agaviDir . '/config/AgaviXmlConfigParser.class.php'); 
     286    // extended DOM* classes 
     287    require($agaviDir . '/config/dom/AgaviXmlConfigDomAttr.class.php'); 
     288    require($agaviDir . '/config/dom/AgaviXmlConfigDomCharacterData.class.php'); 
     289    require($agaviDir . '/config/dom/AgaviXmlConfigDomComment.class.php'); 
     290    require($agaviDir . '/config/dom/AgaviXmlConfigDomDocument.class.php'); 
     291    require($agaviDir . '/config/dom/AgaviXmlConfigDomDocumentFragment.class.php'); 
     292    require($agaviDir . '/config/dom/AgaviXmlConfigDomDocumentType.class.php'); 
     293    require($agaviDir . '/config/dom/AgaviXmlConfigDomElement.class.php'); 
     294    require($agaviDir . '/config/dom/AgaviXmlConfigDomEntity.class.php'); 
     295    require($agaviDir . '/config/dom/AgaviXmlConfigDomEntityReference.class.php'); 
     296    require($agaviDir . '/config/dom/AgaviXmlConfigDomNode.class.php'); 
     297    require($agaviDir . '/config/dom/AgaviXmlConfigDomNotation.class.php'); 
     298    require($agaviDir . '/config/dom/AgaviXmlConfigDomProcessingInstruction.class.php'); 
     299    require($agaviDir . '/config/dom/AgaviXmlConfigDomText.class.php'); 
    286300 
    287301    // manually create our config_handlers.xml handler 
     
    292306      'validation' => array( 
    293307        AgaviXmlConfigParser::VALIDATION_TYPE_XMLSCHEMA => array( 
    294           AgaviConfig::get('core.agavi_dir') . '/config/xsd/config_handlers.xsd', 
     308          $agaviDir . '/config/xsd/config_handlers.xsd', 
    295309        ), 
    296310      ), 
  • branches/david-xml_only_config_system/src/config/AgaviConfigParser.class.php

    r2259 r2468  
    8484  { 
    8585    foreach($nodes as $node) { 
    86       if($node->nodeType == XML_ELEMENT_NODE && (!$node->namespaceURI || $node->namespaceURI == AgaviXmlConfigParser::XML_NAMESPACE)) { 
     86      if($node->nodeType == XML_ELEMENT_NODE && (!$node->namespaceURI || $node->namespaceURI == AgaviXmlConfigParser::AGAVI_1_0_CONFIG_XML_NAMESPACE)) { 
    8787        $vh = new AgaviConfigValueHolder(); 
    8888        $nodeName = $this->convertEncoding($node->localName); 
     
    9191 
    9292        foreach($node->attributes as $attribute) { 
    93           if((!$attribute->namespaceURI || $attribute->namespaceURI == AgaviXmlConfigParser::XML_NAMESPACE)) { 
     93          if((!$attribute->namespaceURI || $attribute->namespaceURI == AgaviXmlConfigParser::AGAVI_1_0_CONFIG_XML_NAMESPACE)) { 
    9494            $vh->setAttribute($this->convertEncoding($attribute->localName), $this->convertEncoding($attribute->nodeValue)); 
    9595          } 
  • branches/david-xml_only_config_system/src/config/AgaviIXmlConfigHandler.interface.php

    r2259 r2468  
    4949   * Execute this configuration handler. 
    5050   * 
    51    * @param      array An array of DOMDocuments (the config and all parents). 
     51   * @param      DOMDocument The document to parse. 
    5252   * 
    5353   * @return     string Data to be written to a cache file. 
     
    5959   * @since      0.11.0 
    6060   */ 
    61   public function execute(array $docs = array()); 
     61  public function execute(DOMDocument $doc); 
    6262} 
    6363 
  • branches/david-xml_only_config_system/src/config/AgaviWsdlConfigHandler.class.php

    r2259 r2468  
    3333   * Execute this configuration handler. 
    3434   * 
    35    * @param      array An array of DOMDocuments (the config and all parents). 
     35   * @param      DOMDocument The document to parse. 
    3636   * 
    3737   * @return     string Data to be written to a cache file. 
     
    4343   * @since      0.11.0 
    4444   */ 
    45   public function execute(array $docs = array()) 
     45  public function execute(DOMDocument $doc) 
    4646  { 
    47     if(isset($docs[0])) { 
    48       $doc = $docs[0]; 
    49     } else { 
    50       return; 
    51     } 
    52      
    5347    $ro = $this->context->getRouting(); 
    5448     
  • branches/david-xml_only_config_system/src/config/AgaviXmlConfigParser.class.php

    r2316 r2468  
    2121 * @subpackage config 
    2222 * 
     23 * @author     David Zülke <dz@bitxtender.com> 
    2324 * @author     Dominik del Bondio <ddb@bitxtender.com> 
    2425 * @copyright  Authors 
     
    3132class AgaviXmlConfigParser 
    3233{ 
    33   const XML_NAMESPACE = 'http://agavi.org/agavi/1.0/config'; 
     34  const AGAVI_1_0_CONFIG_XML_NAMESPACE = 'http://agavi.org/agavi/1.0/config'; 
     35   
     36  const AGAVI_LATEST_CONFIG_XML_NAMESPACE = self::AGAVI_1_0_CONFIG_XML_NAMESPACE; 
    3437   
    3538  const VALIDATION_TYPE_XMLSCHEMA = 'xml_schema'; 
     
    4043   
    4144  /** 
     45   * @var        array A list of XML namespaces for Agavi configuration files. 
     46   */ 
     47  static $agaviConfigXmlNamespaces = array( 
     48    self::AGAVI_1_0_CONFIG_XML_NAMESPACE, 
     49  ); 
     50   
     51  /** 
    4252   * @var        string The path to the config file we're currently parsing. 
    4353   */ 
    44   protected $config = ''; 
     54  protected $path = ''; 
    4555   
    4656  /** 
    4757   * @param      string An absolute filesystem path to a configuration file. 
    4858   * @param      array  An associative array of validation information. 
    49    * 
    50    * @return     array An array of DOMDocuments (from child to parent). 
     59   * @param      string The environment name. 
     60   * @param      string The context name. 
     61   * 
     62   * @return     DOMDocument A properly merged DOMDocument. 
    5163   * 
    5264   * @author     David Zülke <dz@bitxtender.com> 
     
    5466   * @since      0.11.0 
    5567   */ 
    56   public function parseAll($config, array $validation = array()) 
    57   { 
    58     $retval = array(); 
    59      
    60     $nextConfig = $config; 
    61      
    62     while($nextConfig !== null) { 
    63       $doc = $this->parse($nextConfig, $validation); 
     68  public static function execute($path, array $validation = array(), $environment, $context = null) 
     69  { 
     70    $isAgaviConfigFormat = true; 
     71    // build an array of documents (this one, and the parents) 
     72    $docs = array(); 
     73    $nextPath = $path; 
     74    while($nextPath !== null) { 
     75      $parser = new AgaviXmlConfigParser(); 
     76      $doc = $parser->parse($nextPath, $validation); 
     77      $doc->xpath = new DOMXPath($doc); 
     78      $docs[] = $doc; 
    6479       
    65       if($doc->documentElement && $doc->documentElement->hasAttribute('parent')) { 
    66         $nextConfig = AgaviToolkit::literalize($doc->documentElement->getAttribute('parent')); 
     80      // make sure it (still) is a <configurations> file with the proper agavi namespace 
     81      if($isAgaviConfigFormat) { 
     82        $isAgaviConfigFormat = $doc->documentElement && $doc->documentElement->nodeName == 'configuration' && $doc->documentElement->namespaceURI == self::AGAVI_LATEST_CONFIG_XML_NAMESPACE; 
     83      } 
     84       
     85      // is it an agavi <configurations> element? does it have a parent attribute? yes? good. parse that next 
     86      // TODO: support future namespaces 
     87      if($isAgaviConfigFormat && $doc->documentElement->hasAttribute('parent')) { 
     88        $nextPath = AgaviToolkit::literalize($doc->documentElement->getAttribute('parent')); 
    6789      } else { 
    68         $nextConfig = null; 
    69       } 
    70        
    71       $retval[] = $doc; 
    72     } 
     90        $isAgaviConfigFormat = false; 
     91        $nextPath = null; 
     92      } 
     93    } 
     94     
     95    // TODO: use our own classes here that extend DOM* 
     96    $retval = new AgaviXmlConfigDomDocument(); 
     97     
     98    if($isAgaviConfigFormat) { 
     99      $retval->appendChild(new AgaviXmlConfigDomElement('configurations', null, self::AGAVI_LATEST_CONFIG_XML_NAMESPACE)); 
     100     
     101      // reverse the array - we want the parents first! 
     102      $docs = array_reverse($docs); 
     103     
     104      $configurationElements = array(); 
     105     
     106      // TODO: I bet this leaks memory due to the nodes being taken out of the docs. beware circular refs! 
     107      foreach($docs as $doc) { 
     108        // iterate over all nodes (attributes, <sandbox>, <configuration> etc) inside the document element and append them to the <configurations> element in our final document 
     109        foreach($doc->documentElement->childNodes as $node) { 
     110          if($node->nodeType == XML_ELEMENT_NODE && $node->nodeName == 'configuration' && $node->namespaceURI == self::AGAVI_LATEST_CONFIG_XML_NAMESPACE) { 
     111            // it's a <configuration> element - put that on a stack for processing 
     112            $configurationElements[] = $node; 
     113          } else { 
     114            // import the node, recursively, and store the imported node 
     115            $importedNode = $retval->importNode($node, true); 
     116            // now append it to the <configurations> element 
     117            $retval->documentElement->appendChild($importedNode); 
     118          } 
     119        } 
     120      } 
     121     
     122      $configurationOrder = array( 
     123        'count(self::node()[not(@environment) and not(@context)])', 
     124        'count(self::node()[@environment and not(@context)])', 
     125        'count(self::node()[not(@environment) and @context])', 
     126        'count(self::node()[@environment and @context])', 
     127      ); 
     128      $testAttributes = array( 
     129        'context' => $context, 
     130        'environment' => $environment, 
     131      ); 
     132     
     133      // we sort the nodes - generic ones first, then those that are per-environment, then those per-context, then those per-both 
     134      foreach($configurationOrder as $xpath) { 
     135        foreach($configurationElements as &$element) { 
     136          if($element->ownerDocument->xpath->evaluate($xpath, $element)) { 
     137            foreach($testAttributes as $attributeName => $attributeValue) { 
     138              // TODO: move that method or something 
     139              if($element->hasAttribute($attributeName) && !AgaviConfigHandler::testPattern($element->getAttribute($attributeName), $attributeValue)) { 
     140                continue 2; 
     141              } 
     142            } 
     143            $importedNode = $retval->importNode($element, true); 
     144            $retval->documentElement->appendChild($importedNode); 
     145          } 
     146        } 
     147      } 
     148    } else { 
     149      // it's not an agavi config file. just pass it through then 
     150      $retval->appendChild($retval->importNode($doc->documentElement, true)); 
     151    } 
     152     
     153    echo '<pre>' . htmlspecialchars($retval->saveXML()) . '</pre>'; 
     154    die(); 
    73155     
    74156    return $retval; 
     
    85167   * @since      0.11.0 
    86168   */ 
    87   public function parse($config, array $validation = array()) 
    88   { 
    89     if(!is_readable($config)) { 
    90       $error = 'Configuration file "' . $config . '" does not exist or is unreadable'; 
     169  public function parse($path, array $validation = array()) 
     170  { 
     171    if(!is_readable($path)) { 
     172      $error = 'Configuration file "' . $path . '" does not exist or is unreadable'; 
    91173      throw new AgaviUnreadableException($error); 
    92174    } 
    93175     
    94     $doc = $this->load($config); 
     176    $doc = $this->load($path); 
    95177     
    96178    $this->transform($doc); 
     
    104186   
    105187  /** 
    106    * Load the configuration file into DOM and resolve XIncludes. 
     188   * Load the configuration file and resolve XIncludes. 
    107189   * 
    108190   * @param      string The path to the configuration file. 
    109191   * 
    110    * @return     DOMDocument The loaded document. 
    111    * 
    112    * @author     David Zülke <dz@bitxtender.com> 
    113    * @since      0.11.0 
    114    */ 
    115   public function load($config) 
    116   { 
    117     $this->config = $config; 
     192   * @return     DOMDocument A document with. 
     193   * 
     194   * @author     David Zülke <dz@bitxtender.com> 
     195   * @since      0.11.0 
     196   */ 
     197  public function load($path) 
     198  { 
     199    $this->path = $path; 
    118200     
    119201    $luie = libxml_use_internal_errors(true); 
    120202    libxml_clear_errors(); 
    121203    $doc = new DOMDocument(); 
    122     $doc->load($config); 
     204    $doc->load($path); 
    123205    if(libxml_get_last_error() !== false) { 
    124206      $errors = array(); 
     
    131213        sprintf( 
    132214          'Configuration file "%s" could not be parsed due to the following error%s: ' . "\n\n%s",  
    133           $config,  
     215          $path,  
    134216          count($errors) > 1 ? 's' : '',  
    135217          implode("\n", $errors) 
     
    165247          sprintf( 
    166248            'Configuration file "%s" could not be parsed due to the following error%s that occured while resolving XInclude directives: ' . "\n\n%s",  
    167             $config,  
     249            $path,  
    168250            count($errors) > 1 ? 's' : '',  
    169251            implode("\n", $errors) 
     
    183265    $needsReload = false; 
    184266     
     267    // TODO: get rid of this for 1.0 
    185268    // if there is no xmlns declaration on the root element, we gotta add it. must do after xinclude() to maintain BC 
    186269    if($doc->documentElement && !$doc->documentElement->namespaceURI) { 
    187       $doc->documentElement->setAttribute('xmlns', self::XML_NAMESPACE); 
     270      $doc->documentElement->setAttribute('xmlns', self::AGAVI_LATEST_CONFIG_XML_NAMESPACE); 
    188271       
    189272      $needsReload = true; 
     
    246329                sprintf( 
    247330                  'Configuration file "%s" could not be parsed due to the following error%s that occured while loading the specified XSL stylesheet "%s": ' . "\n\n%s",  
    248                   $this->config,  
     331                  $this->path,  
    249332                  count($errors) > 1 ? 's' : '',  
    250333                  $href, 
     
    257340              sprintf( 
    258341                'Configuration file "%s" could not be parsed because the inline stylesheet "%s" referenced in the "xml-stylesheet" processing instruction could not be found in the document.',  
    259                 $this->config,  
     342                $this->path,  
    260343                $href 
    261344              ) 
     
    276359              sprintf( 
    277360                'Configuration file "%s" could not be parsed due to the following error%s that occured while loading the specified XSL stylesheet "%s": ' . "\n\n%s",  
    278                 $this->config,  
     361                $this->path,  
    279362                count($errors) > 1 ? 's' : '',  
    280363                $href, 
     
    299382            sprintf( 
    300383              'Configuration file "%s" could not be parsed due to the following error%s that occured while importing the specified XSL stylesheet "%s": ' . "\n\n%s",  
    301               $this->config,  
     384              $this->path,  
    302385              count($errors) > 1 ? 's' : '',  
    303386              $href, 
     
    321404            sprintf( 
    322405              'Configuration file "%s" could not be parsed due to the following error%s that occured while transforming the document using the XSL stylesheet "%s": ' . "\n\n%s",  
    323               $this->config,  
     406              $this->path,  
    324407              count($errors) > 1 ? 's' : '',  
    325408              $href, 
     
    389472        if(!isset($info['scheme']) && !AgaviToolkit::isPathAbsolute($source)) { 
    390473          // the schema location is relative to the XML file 
    391           $source = dirname($this->config) . DIRECTORY_SEPARATOR . $source; 
     474          $source = dirname($this->path) . DIRECTORY_SEPARATOR . $source; 
    392475        } 
    393476        $source = file_get_contents($source); 
     
    409492    $xpath = new DOMXPath($doc); 
    410493     
    411     if($doc->documentElement && $doc->documentElement->namespaceURI == self::XML_NAMESPACE) { 
     494    if($doc->documentElement && $doc->documentElement->namespaceURI == self::AGAVI_LATEST_CONFIG_XML_NAMESPACE) { 
    412495      $xpath->registerNamespace('agavi', $doc->documentElement->namespaceURI); 
    413496      // remove top-level <sandbox> elements 
     
    437520      if(!is_resource($validationFile) && !is_readable($validationFile)) { 
    438521        libxml_use_internal_errors($luie); 
    439         $error = 'Validation file "' . $validationFile . '" for configuration file "' . $this->config . '" does not exist or is unreadable'; 
     522        $error = 'Validation file "' . $validationFile . '" for configuration file "' . $this->path . '" does not exist or is unreadable'; 
    440523        throw new AgaviUnreadableException($error); 
    441524      } 
     
    452535          sprintf( 
    453536            'XML Schema validation of configuration file "%s" failed due to the following error%s: ' . "\n\n%s",  
    454             $this->config,  
     537            $this->path,  
    455538            count($errors) > 1 ? 's' : '',  
    456539            implode("\n", $errors) 
     
    471554          sprintf( 
    472555            'XML Schema validation of configuration file "%s" failed due to the following error%s: ' . "\n\n%s",  
    473             $this->config,  
     556            $this->path,  
    474557            count($errors) > 1 ? 's' : '',  
    475558            implode("\n", $errors) 
     
    498581      if(!is_readable($validationFile)) { 
    499582        libxml_use_internal_errors($luie); 
    500         $error = 'Validation file "' . $validationFile . '" for configuration file "' . $this->config . '" does not exist or is unreadable'; 
     583        $error = 'Validation file "' . $validationFile . '" for configuration file "' . $this->path . '" does not exist or is unreadable'; 
    501584        throw new AgaviUnreadableException($error); 
    502585      } 
     
    513596          sprintf( 
    514597            'XML Schema validation of configuration file "%s" failed due to the following error%s: ' . "\n\n%s",  
    515             $this->config,  
     598            $this->path,  
    516599            count($errors) > 1 ? 's' : '',  
    517600            implode("\n", $errors) 
     
    532615          sprintf( 
    533616            'XML Schema validation of configuration file "%s" failed due to the following error%s: ' . "\n\n%s",  
    534             $this->config,  
     617            $this->path,  
    535618            count($errors) > 1 ? 's' : '',  
    536619            implode("\n", $errors) 
     
    562645      if(!is_readable($validationFile)) { 
    563646        libxml_use_internal_errors($luie); 
    564         $error = 'Validation file "' . $validationFile . '" for configuration file "' . $this->config . '" does not exist or is unreadable'; 
     647        $error = 'Validation file "' . $validationFile . '" for configuration file "' . $this->path . '" does not exist or is unreadable'; 
    565648        throw new AgaviUnreadableException($error); 
    566649      } 
     
    576659          sprintf( 
    577660            'XML Schema validation of configuration file "%s" failed due to the following error%s: ' . "\n\n%s",  
    578             $this->config,  
     661            $this->path,  
    579662            count($errors) > 1 ? 's' : '',  
    580663            implode("\n", $errors) 
  • branches/david-xml_only_config_system/src/config/defaults/autoload.xml

    r2357 r2468  
    3535      <autoload name="AgaviValidatorConfigHandler">%core.agavi_dir%/config/AgaviValidatorConfigHandler.class.php</autoload> 
    3636      <autoload name="AgaviWsdlConfigHandler">%core.agavi_dir%/config/AgaviWsdlConfigHandler.class.php</autoload> 
     37      <autoload name="AgaviXmlConfigDomAttr">%core.agavi_dir%/config/dom/AgaviXmlConfigDomAttr.class.php</autoload> 
     38      <autoload name="AgaviXmlConfigDomCharacterData">%core.agavi_dir%/config/dom/AgaviXmlConfigDomCharacterData.class.php</autoload> 
     39      <autoload name="AgaviXmlConfigDomComment">%core.agavi_dir%/config/dom/AgaviXmlConfigDomComment.class.php</autoload> 
     40      <autoload name="AgaviXmlConfigDomDocument">%core.agavi_dir%/config/dom/AgaviXmlConfigDomDocument.class.php</autoload> 
     41      <autoload name="AgaviXmlConfigDomDocumentFragment">%core.agavi_dir%/config/dom/AgaviXmlConfigDomDocumentFragment.class.php</autoload> 
     42      <autoload name="AgaviXmlConfigDomDocumentType">%core.agavi_dir%/config/dom/AgaviXmlConfigDomDocumentType.class.php</autoload> 
     43      <autoload name="AgaviXmlConfigDomElement">%core.agavi_dir%/config/dom/AgaviXmlConfigDomElement.class.php</autoload> 
     44      <autoload name="AgaviXmlConfigDomEntity">%core.agavi_dir%/config/dom/AgaviXmlConfigDomEntity.class.php</autoload> 
     45      <autoload name="AgaviXmlConfigDomEntityReference">%core.agavi_dir%/config/dom/AgaviXmlConfigDomEntityReference.class.php</autoload> 
     46      <autoload name="AgaviXmlConfigDomNode">%core.agavi_dir%/config/dom/AgaviXmlConfigDomNode.class.php</autoload> 
     47      <autoload name="AgaviXmlConfigDomNotation">%core.agavi_dir%/config/dom/AgaviXmlConfigDomNotation.class.php</autoload> 
     48      <autoload name="AgaviXmlConfigDomProcessingInstruction">%core.agavi_dir%/config/dom/AgaviXmlConfigDomProcessingInstruction.class.php</autoload> 
     49      <autoload name="AgaviXmlConfigDomText">%core.agavi_dir%/config/dom/AgaviXmlConfigDomText.class.php</autoload> 
    3750      <autoload name="AgaviXmlConfigHandler">%core.agavi_dir%/config/AgaviXmlConfigHandler.class.php</autoload> 
    3851      <autoload name="AgaviXmlConfigParser">%core.agavi_dir%/config/AgaviXmlConfigParser.class.php</autoload> 
  • branches/david-xml_only_config_system/src/config/defaults/config_handlers.xml

    r1999 r2468  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<configurations xmlns="http://agavi.org/agavi/1.0/config"> 
     3   
     4  <configuration environment="development"> 
     5    <handlers> 
     6      <handler pattern="%core.config_dir%/autoload.xml" validate="%core.agavi_dir%/config/xsd/autoload.xsd" class="AgaviAutoloadConfigHandler" /> 
     7      <handler pattern="%core.system_config_dir%/autoload.xml" validate="%core.agavi_dir%/config/xsd/autoload.xsd" class="AgaviAutoloadConfigHandler" /> 
     8    </handlers> 
     9  </configuration> 
     10   
    311  <configuration> 
    412    <handlers>