File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * This file is part of the LeanMapperQuery extension
5+ * for the Lean Mapper library (http://leanmapper.com)
6+ */
7+
8+ namespace LeanMapperQuery \Exception ;
9+
10+ class NotImplementedException extends Exception
11+ {
12+ }
Original file line number Diff line number Diff line change 1919use LeanMapperQuery \Exception \InvalidStateException ;
2020use LeanMapperQuery \Exception \MemberAccessException ;
2121use LeanMapperQuery \Exception \NonExistingMethodException ;
22+ use LeanMapperQuery \Exception \NotImplementedException ;
2223
2324/**
2425 * @author Michal Bohuslávek
3031 * @method Query limit(int $limit)
3132 * @method Query offset(int $offset)
3233 */
33- class Query implements IQuery
34+ class Query implements IQuery, \Iterator
3435{
3536 /** @var string */
3637 private static $ defaultPlaceholder = '? ' ;
@@ -576,4 +577,31 @@ private function commandOffset($offset)
576577 $ this ->fluent ->offset ($ offset );
577578 }
578579
580+ //////////////////// Iterator //////////////////////
581+
582+ public function current ()
583+ {
584+ throw new NotImplementedException ("Query object is not iterable. " );
585+ }
586+
587+ public function next ()
588+ {
589+ throw new NotImplementedException ("Query object is not iterable. " );
590+ }
591+
592+ public function rewind ()
593+ {
594+ throw new NotImplementedException ("Query object is not iterable. " );
595+ }
596+
597+ public function key ()
598+ {
599+ throw new NotImplementedException ("Query object is not iterable. " );
600+ }
601+
602+ public function valid ()
603+ {
604+ throw new NotImplementedException ("Query object is not iterable. " );
605+ }
606+
579607}
You can’t perform that action at this time.
0 commit comments