private function _queryForWrite() { if ($this->_readonly) { throw new Exception("Collection is read-only during iteration"); } return $this->_query; }