Changeset 2411

Show
Ignore:
Timestamp:
03/28/08 18:44:17 (10 months ago)
Author:
david
Message:

merge [2410]

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r2405 r2411  
    18180.11.1 RC3 (March ??, 2008) 
    1919--------------------------- 
     20 
     21ADD: Add ability to cache complete request attribute namespaces in Execution Filter (#740) (David) 
    2022 
    2123CHG: Update timezone database to 2008b (#728) (David) 
  • trunk/src/config/AgaviCachingConfigHandler.class.php

    r2259 r2411  
    123123            } 
    124124             
     125            $requestAttributeNamespaces = array(); 
     126            if(isset($outputType->request_attribute_namespaces)) { 
     127              foreach($outputType->request_attribute_namespaces as $requestAttributeNamespace) { 
     128                $requestAttributeNamespaces[] = $requestAttributeNamespace->getValue(); 
     129              } 
     130            } 
     131             
    125132            $otnames = array_map('trim', explode(' ', $outputType->getAttribute('name', '*'))); 
    126133            foreach($otnames as $otname) { 
     
    129136                'template_variables' => $templateVariables, 
    130137                'request_attributes' => $requestAttributes, 
     138                'request_attribute_namespaces' => $requestAttributeNamespaces, 
    131139              ); 
    132140            } 
  • trunk/src/config/xsd/caching.xsd

    r2307 r2411  
    100100    <xs:sequence maxOccurs="unbounded"> 
    101101      <xs:group ref="request_attributes" /> 
     102      <xs:group ref="request_attribute_namespaces" /> 
    102103      <xs:group ref="template_variables" /> 
    103104      <xs:group ref="layers" /> 
     
    123124      </xs:extension> 
    124125    </xs:simpleContent> 
     126  </xs:complexType> 
     127 
     128  <xs:group name="request_attribute_namespaces"> 
     129    <xs:choice> 
     130      <xs:element name="request_attribute_namespaces" type="request_attribute_namespaces" minOccurs="0" /> 
     131      <xs:element name="request_attribute_namespace" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> 
     132    </xs:choice> 
     133  </xs:group> 
     134  <xs:complexType name="request_attribute_namespaces"> 
     135    <xs:sequence> 
     136      <xs:element name="request_attribute_namespace" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 
     137    </xs:sequence> 
    125138  </xs:complexType> 
    126139 
  • trunk/src/filter/AgaviExecutionFilter.class.php

    r2309 r2411  
    391391          foreach($viewCache['request_attributes'] as $requestAttribute) { 
    392392            $request->setAttribute($requestAttribute['name'], $requestAttribute['value'], $requestAttribute['namespace']); 
     393          } 
     394           
     395          foreach($viewCache['request_attribute_namespaces'] as $ranName => $ranValues) { 
     396            $request->setAttributes($ranValues, $ranName); 
    393397          } 
    394398 
     
    499503            $viewCache['request_attributes'][] = $requestAttribute + array('value' => $request->getAttribute($requestAttribute['name'], $requestAttribute['namespace'])); 
    500504          } 
     505          foreach($otConfig['request_attribute_namespaces'] as $requestAttributeNamespace) { 
     506            $viewCache['request_attribute_namespaces'][$requestAttributeNamespace] = $request->getAttributes($requestAttributeNamespace); 
     507          } 
    501508 
    502509          $this->writeCache(array_merge($groups, array($outputType)), $viewCache, $config['lifetime']);