From 8ecb1f4fde3882ab7a9f4c13e178741909dc8618 Mon Sep 17 00:00:00 2001 From: Jan Pecha Date: Mon, 11 Jul 2016 08:44:42 +0200 Subject: [PATCH] Query: iterating of Query object throws exception --- src/Exception/NotImplementedException.php | 12 +++++++++ src/Query.php | 33 ++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/Exception/NotImplementedException.php diff --git a/src/Exception/NotImplementedException.php b/src/Exception/NotImplementedException.php new file mode 100644 index 0000000..6535bb4 --- /dev/null +++ b/src/Exception/NotImplementedException.php @@ -0,0 +1,12 @@ +fluent->offset($offset); } + /****************** Iterator ******************/ + public function current() + { + throw new NotImplementedException("Query object is not iterable."); + } + + + public function next() + { + throw new NotImplementedException("Query object is not iterable."); + } + + + public function rewind() + { + throw new NotImplementedException("Query object is not iterable."); + } + + + public function key() + { + throw new NotImplementedException("Query object is not iterable."); + } + + + public function valid() + { + throw new NotImplementedException("Query object is not iterable."); + } + }