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