MDL-63044 course: add get_enrolled_courses_by_timeline_classification
[moodle.git] / lib / phpexcel / PHPExcel / Worksheet / CellIterator.php
blob151c17f534aa3f7230db2465c1693517e3a52089
1 <?php
3 /**
4 * PHPExcel_Worksheet_CellIterator
6 * Copyright (c) 2006 - 2015 PHPExcel
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 * @category PHPExcel
23 * @package PHPExcel_Worksheet
24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
26 * @version ##VERSION##, ##DATE##
28 abstract class PHPExcel_Worksheet_CellIterator
30 /**
31 * PHPExcel_Worksheet to iterate
33 * @var PHPExcel_Worksheet
35 protected $subject;
37 /**
38 * Current iterator position
40 * @var mixed
42 protected $position = null;
44 /**
45 * Iterate only existing cells
47 * @var boolean
49 protected $onlyExistingCells = false;
51 /**
52 * Destructor
54 public function __destruct()
56 unset($this->subject);
59 /**
60 * Get loop only existing cells
62 * @return boolean
64 public function getIterateOnlyExistingCells()
66 return $this->onlyExistingCells;
69 /**
70 * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary
72 * @throws PHPExcel_Exception
74 abstract protected function adjustForExistingOnlyRange();
76 /**
77 * Set the iterator to loop only existing cells
79 * @param boolean $value
80 * @throws PHPExcel_Exception
82 public function setIterateOnlyExistingCells($value = true)
84 $this->onlyExistingCells = (boolean) $value;
86 $this->adjustForExistingOnlyRange();