helly Tue Mar 1 18:44:05 2005 EDT
Modified files:
/php-src/ext/spl spl.php
/php-src/ext/spl/internal seekableiterator.inc
Log:
- Update docu
http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.43&r2=1.44&ty=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.43 php-src/ext/spl/spl.php:1.44
--- php-src/ext/spl/spl.php:1.43 Wed Feb 16 19:24:57 2005
+++ php-src/ext/spl/spl.php Tue Mar 1 18:44:05 2005
@@ -548,6 +548,7 @@
function getArrayCopy();
/** @param $position offset to seek to
+ * @throw OutOfBoundsException if $position is invalid
*/
function seek($position);
http://cvs.php.net/diff.php/php-src/ext/spl/internal/seekableiterator.inc?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/spl/internal/seekableiterator.inc
diff -u php-src/ext/spl/internal/seekableiterator.inc:1.5
php-src/ext/spl/internal/seekableiterator.inc:1.6
--- php-src/ext/spl/internal/seekableiterator.inc:1.5 Wed Feb 16 19:24:57 2005
+++ php-src/ext/spl/internal/seekableiterator.inc Tue Mar 1 18:44:05 2005
@@ -25,17 +25,24 @@
* \param $index position to seek to
* \return void
*
- * \note The method should throw an exception if it is not possible to
- * seek to the given position.
- */
+ * The method should throw an exception if it is not possible to seek
to
+ * the given position. Typically this exception should be of type
+ * OutOfBoundsException.
+ \code
function seek($index);
-/* $this->rewind();
+ $this->rewind();
$position = 0;
while($position < $index && $this->valid()) {
$this->next();
$position++;
}
- }*/
+ if (!$this->valid()) {
+ throw new OutOfBoundsException('Invalid seek position');
+ }
+ }
+ \endcode
+ */
+ function seek($index);
}
?>
\ No newline at end of file
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php