Changeset 909
- Timestamp:
- 09/12/07 00:09:41 (1 year ago)
- Files:
-
- trunk/src/main/php/net/stubbles/ipo/session/resourcemanager/stubSessionResourceManager.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/ipo/session/resourcemanager/stubSessionResourceManagerPreInterceptor.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/xml/stubXMLProcessor.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ipo/session/resourcemanager/stubSessionResourceManager.php
r908 r909 103 103 $sessionKey = 'net.stubbles.ipo.session.resourcemanager#'.$implementation; 104 104 if ($this->session->hasValue($sessionKey)) { 105 $this->resources[$implementation] = $this->session->getValue($sessionKey);105 $this->resources[$implementation] = $this->session->getValue($sessionKey); 106 106 $this->session->putValue($sessionKey, $this->resources[$implementation]); 107 return $this->resources[$implementation];107 return $this->resources[$implementation]; 108 108 } 109 109 … … 156 156 protected function getImplementation($interface) { 157 157 if (!isset($this->resourceDefinitions[$interface])) { 158 throw new stubException('Resource ' . $interface . ' is not availabale.');158 throw new stubException('Resource ' . $interface . ' is not availabale.'); 159 159 } 160 160 return $this->resourceDefinitions[$interface]; … … 181 181 public function registerBindings(stubBinder $binder) { 182 182 foreach ($this->resourceDefinitions as $interface => $impl) { 183 $localName = substr($interface, strrpos($interface, '.')+1);184 $binder->bind($localName)->toProvider($this);183 $localName = substr($interface, strrpos($interface, '.')+1); 184 $binder->bind($localName)->toProvider($this); 185 185 } 186 186 } trunk/src/main/php/net/stubbles/ipo/session/resourcemanager/stubSessionResourceManagerPreInterceptor.php
r908 r909 44 44 $manager = new stubSessionResourceManager($session); 45 45 foreach ($this->resourceConfig as $impl => $interfaces) { 46 $manager->addResourceDefinition($impl, $interfaces);46 $manager->addResourceDefinition($impl, $interfaces); 47 47 } 48 48 stubRegistry::set('net.stubbles.ipo.session.resourcemanager.stubSessionResourceManager', $manager); trunk/src/main/php/net/stubbles/websites/xml/stubXMLProcessor.php
r908 r909 59 59 $injector = stubRegistry::get('net.stubbles.ioc.stubBinder')->getInjector(); 60 60 } else { 61 $injector = null;61 $injector = null; 62 62 } 63 63 … … 85 85 $xmlStreamWriter->writeStartElement('resources'); 86 86 foreach ($page->getResources() as $name => $interface) { 87 $resource = $resourceManager->getResource($interface);87 $resource = $resourceManager->getResource($interface); 88 88 $xmlSerializer->serialize($resource, $xmlStreamWriter, array(stubXMLSerializer::OPT_ROOT_TAG => $name)); 89 89 }
