Changeset 1188
- Timestamp:
- 12/25/07 18:57:54 (8 months ago)
- Files:
-
- trunk/build/vfs/package.php (modified) (1 diff)
- trunk/src/main/php/org/stubbles/vfs/vfsStreamWrapper.php (modified) (1 diff)
- trunk/src/test/php/org/stubbles/vfs/vfsStreamWrapperTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/vfs/package.php
r1187 r1188 41 41 - moved vfsStreamWrapper::PROTOCOL to vfsStream::SCHEME 42 42 - added new vfsStream::url() method to assist in creating correct vfsStream urls 43 - a call to vfsStreamWrapper::register() will now reset the root to null (implemented because of a hint by David Zülke) 43 44 EOT; 44 45 trunk/src/main/php/org/stubbles/vfs/vfsStreamWrapper.php
r1183 r1188 44 44 * method to register the stream wrapper 45 45 * 46 * Please be aware that a call to this method will reset the root element 47 * to null. 48 * If the stream is already registered the method returns silently. If there 49 * is already another stream wrapper registered for the scheme used by 50 * vfsStream a vfsStreamException will be thrown. 51 * 46 52 * @throws vfsStreamException 47 53 */ 48 54 public static function register() 49 55 { 56 self::$root = null; 50 57 if (true == self::$registered) { 51 58 return; trunk/src/test/php/org/stubbles/vfs/vfsStreamWrapperTestCase.php
r1183 r1188 93 93 94 94 /** 95 * ensure that a call to vfsStreamWrapper::register() resets the stream 96 * 97 * Implemented because of a hint by David Zülke. 98 */ 99 public function testResetByRegister() 100 { 101 $this->assertReference($this->foo, vfsStreamWrapper::getRoot()); 102 vfsStreamWrapper::register(); 103 $this->assertNull(vfsStreamWrapper::getRoot()); 104 } 105 106 /** 95 107 * assure that a directory iteration works as expected 96 108 */
