Merge branch '5.3'
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / ITraversableObject.class.php
1 <?php
2 namespace wcf\data;
3
4 /**
5 * Interface for enhanced iteration support.
6 *
7 * @author Alexander Ebert
8 * @copyright 2001-2019 WoltLab GmbH
9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
10 * @package WoltLabSuite\Core\Data
11 */
12 interface ITraversableObject extends \SeekableIterator {
13 /**
14 * Sets internal iterator pointer based upon related object id.
15 *
16 * @param int $objectID
17 */
18 public function seekTo($objectID);
19
20 /**
21 * Searches a specific object by object id and setting internal iterator
22 * pointer to found item. Returns `null` if object id is not found.
23 *
24 * @param int $objectID
25 * @return DatabaseObject|null
26 */
27 public function search($objectID);
28 }